Home
last modified time | relevance | path

Searched refs:shm_ (Results 1 – 10 of 10) sorted by relevance

/external/adhd/cras/src/tests/
Dshm_unittest.cc18 memset(&shm_, 0, sizeof(shm_)); in SetUp()
19 shm_.area = in SetUp()
21 calloc(1, sizeof(*shm_.area) + 2048)); in SetUp()
22 cras_shm_set_frame_bytes(&shm_, 4); in SetUp()
23 cras_shm_set_used_size(&shm_, 1024); in SetUp()
24 memcpy(&shm_.area->config, &shm_.config, sizeof(shm_.config)); in SetUp()
30 free(shm_.area); in TearDown()
33 struct cras_audio_shm shm_; member in __anona62741660111::ShmTestSuite
40 buf_ = cras_shm_get_readable_frames(&shm_, 0, &frames_); in TEST_F()
42 cras_shm_buffer_read(&shm_, frames_); in TEST_F()
[all …]
Daudio_thread_unittest_obsolete.cc94 shm_ = cras_rstream_input_shm(rstream_); in SetUp()
122 free(shm_->area); in TearDown()
223 struct cras_audio_shm *shm_; member in ReadStreamSuite
282 EXPECT_EQ(0, shm_->area->write_offset[0]); in TEST_F()
471 EXPECT_EQ(0, cras_shm_num_overruns(shm_)); in TEST_F()
480 EXPECT_EQ(0, cras_shm_num_overruns(shm_)); in TEST_F()
524 shm_ = cras_rstream_output_shm(rstream_); in SetUp()
551 free(shm_->area); in TearDown()
658 struct cras_audio_shm* shm_; member in WriteStreamSuite
718 shm_->area->write_offset[0] = cb_threshold_ * 4; in TEST_F()
[all …]
/external/libchrome/base/memory/
Dshared_memory_android.cc21 DCHECK(!shm_.IsValid()); in Create()
30 shm_ = SharedMemoryHandle::ImportHandle(fd, options.size); in Create()
31 if (!shm_.IsValid()) { in Create()
37 int err = ashmem_set_prot_region(shm_.GetHandle(), flags); in Create()
61 if (shm_.IsValid()) { in Close()
62 shm_.Close(); in Close()
63 shm_ = SharedMemoryHandle(); in Close()
70 SharedMemoryHandle handle = shm_.Duplicate(); in GetReadOnlyHandle()
Dshared_memory_posix.cc47 : shm_(handle), read_only_(read_only) {} in SharedMemory()
95 DCHECK(!shm_.IsValid()); in Create()
201 shm_ = SharedMemoryHandle(FileDescriptor(mapped_file, false), options.size, in Create()
205 options.size, shm_.GetGUID()); in Create()
252 shm_ = SharedMemoryHandle(FileDescriptor(mapped_file, false), 0u, in Open()
255 FileDescriptor(readonly_mapped_file, false), 0, shm_.GetGUID()); in Open()
261 if (!shm_.IsValid()) in MapAt()
275 int ashmem_bytes = ashmem_get_size_region(shm_.GetHandle()); in MapAt()
299 MAP_SHARED, shm_.GetHandle(), offset); in MapAt()
304 mapped_id_ = shm_.GetGUID(); in MapAt()
[all …]
Dref_counted_memory.cc89 : shm_(std::move(shm)), size_(size) { in RefCountedSharedMemory()
90 DCHECK(shm_); in RefCountedSharedMemory()
91 DCHECK(shm_->memory()); in RefCountedSharedMemory()
93 DCHECK_LE(size_, shm_->mapped_size()); in RefCountedSharedMemory()
99 return static_cast<const unsigned char*>(shm_->memory()); in front()
Dshared_memory.h241 SharedMemoryHandle shm_; variable
Dref_counted_memory.h159 const std::unique_ptr<SharedMemory> shm_; variable
/external/libchrome/libchrome_tools/patch/
Dshared_memory_posix.patch24 FileDescriptor(readonly_mapped_file, false), 0, shm_.GetGUID());
31 if (!shm_.IsValid())
45 - if (shm_.IsReadOnly()) {
54 - if (!shm_.SetRegionReadOnly()) { // Ensure the region is read-only.
58 + // if (shm_.IsReadOnly()) {
67 + // if (!shm_.SetRegionReadOnly()) { // Ensure the region is read-only.
81 if (shm_.IsValid()) {
82 shm_.Close();
/external/v4l2_codec2/vda/
Dshared_memory_region.cc15 : shm_(handle, read_only), in SharedMemoryRegion()
34 return shm_.MapAt(offset_ - alignment_size_, size_ + alignment_size_); in Map()
38 int8_t* addr = reinterpret_cast<int8_t*>(shm_.memory()); in memory()
Dshared_memory_region.h47 base::SharedMemory shm_;