/external/adhd/cras/src/common/ |
D | cras_shm.h | 75 static inline uint8_t *cras_shm_buff_for_idx(const struct cras_audio_shm *shm, in cras_shm_buff_for_idx() argument 80 return shm->area->samples + shm->config.used_size * idx; in cras_shm_buff_for_idx() 85 unsigned cras_shm_check_read_offset(const struct cras_audio_shm *shm, in cras_shm_check_read_offset() argument 91 if (offset > shm->config.used_size) in cras_shm_check_read_offset() 98 unsigned cras_shm_check_write_offset(const struct cras_audio_shm *shm, in cras_shm_check_write_offset() argument 104 if (offset > shm->config.used_size) in cras_shm_check_write_offset() 105 return shm->config.used_size; in cras_shm_check_write_offset() 111 unsigned cras_shm_get_curr_read_frames(const struct cras_audio_shm *shm) in cras_shm_get_curr_read_frames() argument 113 unsigned i = shm->area->read_buf_idx & CRAS_SHM_BUFFERS_MASK; in cras_shm_get_curr_read_frames() 117 cras_shm_check_read_offset(shm, shm->area->read_offset[i]); in cras_shm_get_curr_read_frames() [all …]
|
/external/adhd/cras/src/tests/ |
D | cras_client_unittest.cc | 52 void InitShm(struct cras_audio_shm* shm) { in InitShm() argument 53 shm->area = static_cast<cras_audio_shm_area*>( in InitShm() 54 calloc(1, sizeof(*shm->area))); in InitShm() 55 cras_shm_set_frame_bytes(shm, 4); in InitShm() 56 cras_shm_set_used_size(shm, shm_writable_frames_ * 4); in InitShm() 57 memcpy(&shm->area->config, &shm->config, sizeof(shm->config)); in InitShm() 60 void FreeShm(struct cras_audio_shm* shm) { in FreeShm() argument 61 if (shm->area) { in FreeShm() 62 free(shm->area); in FreeShm() 63 shm->area = NULL; in FreeShm() [all …]
|
D | audio_thread_unittest_obsolete.cc | 131 struct cras_audio_shm *shm; in SetupRstream() local 140 shm = cras_rstream_input_shm(*rstream); in SetupRstream() 141 shm->area = (struct cras_audio_shm_area *)calloc(1, in SetupRstream() 142 sizeof(*shm->area) + cb_threshold_ * 8); in SetupRstream() 143 cras_shm_set_frame_bytes(shm, 4); in SetupRstream() 145 shm, cb_threshold_ * cras_shm_frame_bytes(shm)); in SetupRstream() 559 struct cras_audio_shm *shm; in SetupRstream() local 568 shm = cras_rstream_output_shm(*rstream); in SetupRstream() 569 shm->area = (struct cras_audio_shm_area *)calloc(1, in SetupRstream() 570 sizeof(*shm->area) + cb_threshold_ * 8); in SetupRstream() [all …]
|
D | dev_stream_unittest.cc | 107 SetupShm(&rstream_.shm); in SetUp() 134 free(rstream_.shm.area); in TearDown() 138 void SetupShm(struct cras_audio_shm *shm) { in SetupShm() argument 141 shm->area = static_cast<struct cras_audio_shm_area *>( in SetupShm() 143 cras_shm_set_frame_bytes(shm, 4); in SetupShm() 144 cras_shm_set_used_size(shm, in SetupShm() 145 kBufferFrames * cras_shm_frame_bytes(shm)); in SetupShm() 147 buf = (int16_t *)shm->area->samples; in SetupShm() 150 cras_shm_set_mute(shm, 0); in SetupShm() 151 cras_shm_set_volume_scaler(shm, 1.0); in SetupShm() [all …]
|
D | audio_thread_unittest.cc | 120 rstream->shm.area = static_cast<cras_audio_shm_area*>( in SetupRstream() 121 calloc(1, sizeof(rstream->shm.area))); in SetupRstream() 125 free(rstream->shm.area); in TearDownRstream() 656 rstream.shm.config.frame_bytes = 4; in TEST() 659 rstream.shm.config.used_size = 4096 * 4; in TEST() 660 rstream.shm.area = &shm_area; in TEST()
|
/external/adhd/cras/src/server/ |
D | cras_rstream.c | 24 struct cras_audio_shm *shm, in setup_shm() argument 30 if (shm->area != NULL) /* already setup */ in setup_shm() 47 shm->area = mmap(NULL, shm_info->length, in setup_shm() 50 if (shm->area == (struct cras_audio_shm_area *)-1) { in setup_shm() 55 cras_shm_set_volume_scaler(shm, 1.0); in setup_shm() 57 cras_shm_set_frame_bytes(shm, frame_bytes); in setup_shm() 58 shm->config.frame_bytes = frame_bytes; in setup_shm() 59 cras_shm_set_used_size(shm, used_size); in setup_shm() 60 memcpy(&shm->area->config, &shm->config, sizeof(shm->config)); in setup_shm() 69 rc = setup_shm(stream, &stream->shm, in setup_shm_area() [all …]
|
D | dev_stream.c | 267 struct cras_audio_shm *shm; in capture_copy_converted_to_stream() local 277 shm = cras_rstream_input_shm(rstream); in capture_copy_converted_to_stream() 285 shm, in capture_copy_converted_to_stream() 293 shm->area->write_buf_idx, in capture_copy_converted_to_stream() 330 cras_shm_frames_written(shm)); in capture_copy_converted_to_stream() 340 struct cras_audio_shm *shm; in dev_stream_capture() local 361 shm = cras_rstream_input_shm(rstream); in dev_stream_capture() 363 shm, in dev_stream_capture() 378 cras_shm_frames_written(shm)); in dev_stream_capture() 426 struct cras_audio_shm *shm; in dev_stream_capture_avail() local [all …]
|
D | cras_rstream.h | 79 struct cras_audio_shm shm; member 221 return cras_shm_total_size(&stream->shm); in cras_rstream_get_total_shm_size() 224 return cras_shm_total_size(&stream->shm); in cras_rstream_get_total_shm_size() 231 return &stream->shm; in cras_rstream_input_shm() 238 return &stream->shm; in cras_rstream_output_shm() 286 const struct cras_audio_shm *shm = cras_rstream_input_shm(rstream); in cras_rstream_level() local 287 return cras_shm_frames_written(shm); in cras_rstream_level() 292 const struct cras_audio_shm *shm = cras_rstream_input_shm(rstream); in cras_rstream_input_level_met() local 293 return cras_shm_frames_written(shm) >= rstream->cb_threshold; in cras_rstream_input_level_met()
|
D | audio_thread.c | 496 struct cras_audio_shm *shm; in thread_drain_stream_ms_remaining() local 501 shm = cras_rstream_output_shm(rstream); in thread_drain_stream_ms_remaining() 502 fr_in_buff = cras_shm_get_frames(shm); in thread_drain_stream_ms_remaining() 551 static void flush_old_aud_messages(struct cras_audio_shm *shm, int fd) in flush_old_aud_messages() argument 564 cras_shm_set_callback_pending(shm, 0); in flush_old_aud_messages() 591 struct cras_audio_shm *shm = in fetch_streams() local 599 if (cras_shm_callback_pending(shm) && fd >= 0) { in fetch_streams() 600 flush_old_aud_messages(shm, fd); in fetch_streams() 605 if (cras_shm_get_frames(shm) < 0) in fetch_streams() 625 shm->area->write_offset[0], in fetch_streams() [all …]
|
/external/perfetto/src/tracing/ipc/ |
D | posix_shared_memory_unittest.cc | 43 std::unique_ptr<SharedMemory> shm = in TEST() local 45 void* const shm_start = shm->start(); in TEST() 46 const size_t shm_size = shm->size(); in TEST() 53 shm.reset(); in TEST() 58 std::unique_ptr<PosixSharedMemory> shm = in TEST() local 60 int fd = shm->fd(); in TEST() 64 shm.reset(); in TEST() 74 std::unique_ptr<PosixSharedMemory> shm = in TEST() local 76 void* const shm_start = shm->start(); in TEST() 77 const size_t shm_size = shm->size(); in TEST() [all …]
|
/external/ltp/tools/pounder21/src/ramsnake/ |
D | snake.c | 145 void *shm; in main() local 214 shm = mmap(NULL, ram_size, PROT_READ | PROT_WRITE, in main() 216 if (shm == MAP_FAILED) { in main() 220 printf("mmap region: %p (%llu nodes)\n", shm, num_nodes); in main() 234 populate_graph(shm, num_nodes); in main() 293 walk_graph(shm); in main()
|
/external/mesa3d/src/gallium/winsys/sw/xlib/ |
D | xlib_sw_winsys.c | 79 Bool shm; /** Using shared memory images? */ member 170 xlib_dt->shm = False; in alloc_shm_ximage() 192 xlib_dt->shm = False; in alloc_shm_ximage() 197 xlib_dt->shm = True; in alloc_shm_ximage() 207 if (xlib_dt->shm) { in alloc_ximage() 342 if (xlib_dt->shm) { in xlib_sw_display() 416 xlib_dt->shm = True; in xlib_displaytarget_create()
|
/external/mesa3d/src/mesa/drivers/x11/ |
D | xm_buffer.c | 87 b->shm = 0; in alloc_back_shm_ximage() 98 b->shm = 0; in alloc_back_shm_ximage() 110 b->shm = 0; in alloc_back_shm_ximage() 129 b->shm = 0; in alloc_back_shm_ximage() 150 b->shm = 0; in alloc_back_shm_ximage() 178 if (b->shm) { in alloc_back_buffer() 193 if (b->shm == 0 || !alloc_back_shm_ximage(b, width, height)) { in alloc_back_buffer() 397 if (b->shm) { in xmesa_delete_framebuffer()
|
/external/v4l2_codec2/vda/ |
D | v4l2_video_decode_accelerator.cc | 74 std::unique_ptr<SharedMemoryRegion> shm, 79 const std::unique_ptr<SharedMemoryRegion> shm; member 87 std::unique_ptr<SharedMemoryRegion> shm, in BitstreamBufferRef() argument 91 shm(std::move(shm)), in BitstreamBufferRef() 499 if (!bitstream_record->shm->Map()) { in DecodeTask() 504 DVLOGF(4) << "mapped at=" << bitstream_record->shm->memory(); in DecodeTask() 551 const auto& shm = decoder_current_bitstream_buffer_->shm; in DecodeBufferTask() local 552 if (shm) { in DecodeBufferTask() 555 << ", addr=" << shm->memory() << ", size=" << shm->size(); in DecodeBufferTask() 563 const auto& shm = decoder_current_bitstream_buffer_->shm; in DecodeBufferTask() local [all …]
|
/external/ltp/testcases/kernel/hotplug/memory_hotplug/Scripts/ |
D | test3 | 3 shm foo 2g 4 shm bar 2g
|
D | test3l | 1 # memtoy test 3l - single shm seg - lazy mig 4 shm foo 1m
|
D | test3-1m | 3 shm foo 1m 4 shm bar 1m
|
/external/ltp/testcases/kernel/hotplug/memory_hotplug/Xpm-tests/ |
D | test-lazy-shm-8p | 1 # memtoy test - lazy migrate 8p range of single 1M shm seg 4 shm foo 1m
|
D | test-mpm-2shm-1m | 3 shm foo 1m 4 shm bar 1m
|
D | test-lazy-2shm-1m | 3 shm foo 1m 4 shm bar 1m
|
/external/wayland/cursor/ |
D | wayland-cursor.c | 52 shm_pool_create(struct wl_shm *shm, int size) in shm_pool_create() argument 70 pool->pool = wl_shm_create_pool(shm, pool->fd, size); in shm_pool_create() 136 struct wl_shm *shm; member 389 wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm) in wl_cursor_theme_load() argument 407 theme->pool = shm_pool_create(shm, size * size * 4); in wl_cursor_theme_load()
|
/external/libchrome/base/ |
D | feature_list_unittest.cc | 484 std::unique_ptr<SharedMemory> shm(new SharedMemory()); in TEST_F() local 485 shm->CreateAndMapAnonymous(4 << 10); in TEST_F() 486 SharedPersistentMemoryAllocator allocator(std::move(shm), 1, "", false); in TEST_F() 519 std::unique_ptr<SharedMemory> shm(new SharedMemory()); in TEST_F() local 520 shm->CreateAndMapAnonymous(4 << 10); in TEST_F() 521 SharedPersistentMemoryAllocator allocator(std::move(shm), 1, "", false); in TEST_F()
|
/external/linux-kselftest/android/patches/ |
D | 0013-ANDROID-build-vm-tests.patch | 6 The hugepage-mmap, hugepage-shm, map_hugetlb, compaction, and 87 -echo "running hugepage-shm" 89 -./hugepage-shm 224 +#echo "running hugepage-shm" 226 +#./hugepage-shm
|
/external/libchrome/base/metrics/ |
D | field_trial_unittest.cc | 1198 std::unique_ptr<base::SharedMemory> shm(new SharedMemory(handle, true)); in TEST() local 1200 shm.get()->Map(4 << 10); in TEST() 1201 FieldTrialList::CreateTrialsFromSharedMemory(std::move(shm)); in TEST() 1236 std::unique_ptr<base::SharedMemory> shm(new SharedMemory(handle, true)); in TEST() local 1238 shm.get()->Map(4 << 10); in TEST() 1239 FieldTrialList::CreateTrialsFromSharedMemory(std::move(shm)); in TEST() 1320 std::unique_ptr<base::SharedMemory> shm(new SharedMemory(handle, true)); in TEST() local 1322 shm.get()->Map(4 << 10); in TEST() 1323 FieldTrialList::CreateTrialsFromSharedMemory(std::move(shm)); in TEST() 1342 std::unique_ptr<base::SharedMemory> shm(new SharedMemory()); in TEST() local [all …]
|
D | field_trial.cc | 1176 std::unique_ptr<SharedMemory> shm(new SharedMemory(shm_handle, true)); in CreateTrialsFromSharedMemoryHandle() local 1177 if (!shm.get()->Map(kFieldTrialAllocationSize)) in CreateTrialsFromSharedMemoryHandle() 1180 return FieldTrialList::CreateTrialsFromSharedMemory(std::move(shm)); in CreateTrialsFromSharedMemoryHandle() 1185 std::unique_ptr<SharedMemory> shm) { in CreateTrialsFromSharedMemory() argument 1187 new FieldTrialAllocator(std::move(shm), 0, kAllocatorName, true)); in CreateTrialsFromSharedMemory() 1231 std::unique_ptr<SharedMemory> shm(new SharedMemory()); in InstantiateFieldTrialAllocatorIfNeeded() local 1232 if (!shm->Create(options)) in InstantiateFieldTrialAllocatorIfNeeded() 1235 if (!shm->Map(kFieldTrialAllocationSize)) in InstantiateFieldTrialAllocatorIfNeeded() 1239 new FieldTrialAllocator(std::move(shm), 0, kAllocatorName, false)); in InstantiateFieldTrialAllocatorIfNeeded()
|