Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 138) sorted by relevance

123456

/device/generic/goldfish-opengl/shared/OpenglCodecCommon/
DPortableMutex.h38 static __inline__ void mutex_lock(mutex_t* lock) { in mutex_lock() argument
39 pthread_mutex_lock(lock); in mutex_lock()
42 static __inline__ void mutex_unlock(mutex_t* lock) { in mutex_unlock() argument
43 pthread_mutex_unlock(lock); in mutex_unlock()
46 static __inline__ int mutex_init(mutex_t* lock) { in mutex_init() argument
47 return pthread_mutex_init(lock, NULL); in mutex_init()
50 static __inline__ void mutex_destroy(mutex_t* lock) { in mutex_destroy() argument
51 pthread_mutex_destroy(lock); in mutex_destroy()
58 CRITICAL_SECTION lock[1];
63 static __inline__ void mutex_lock(mutex_t* lock) {
[all …]
/device/generic/goldfish-opengl/android-emu/android/base/synchronization/
DAndroidConditionVariable.h44 void signalAndUnlock(StaticLock* lock);
45 void signalAndUnlock(AutoLock* lock);
47 void broadcastAndUnlock(StaticLock* lock);
48 void broadcastAndUnlock(AutoLock* lock);
74 void wait(StaticLock* lock, Predicate pred) { in wait() argument
76 this->wait(lock); in wait()
81 void wait(AutoLock* lock, Predicate pred) { in wait() argument
82 this->wait(&lock->mLock, pred); in wait()
174 inline void ConditionVariable::signalAndUnlock(StaticLock* lock) { in signalAndUnlock() argument
175 lock->unlock(); in signalAndUnlock()
[all …]
DAndroidMessageChannel.cpp24 AutoLock lock(mLock); in size() local
29 android::base::guest::AutoLock lock(mLock); in stop() local
33 mCanWrite.broadcastAndUnlock(&lock); in stop()
37 AutoLock lock(mLock); in isStopped() local
42 AutoLock lock(mLock); in waitForEmpty() local
44 mCanWrite.wait(&lock); in waitForEmpty()
49 mLock.lock(); in beforeWrite()
63 mLock.lock(); in beforeTryWrite()
83 mLock.lock(); in beforeRead()
91 mLock.lock(); in beforeTryRead()
[all …]
DAndroidLock.h54 void lock() { in lock() function
152 AutoLock(StaticLock& lock) : mLock(lock) { mLock.lock(); } in AutoLock() argument
158 void lock() { in lock() function
160 mLock.lock(); in lock()
189 AutoWriteLock(ReadWriteLock& lock) : mLock(lock) { mLock.lockWrite(); } in AutoWriteLock() argument
218 AutoReadLock(ReadWriteLock& lock) : mLock(lock) { mLock.lockRead(); } in AutoReadLock() argument
/device/google/contexthub/firmware/os/core/
Dtrylock.c21 void trylockInit(struct TryLock *lock) in trylockInit() argument
23 lock->lock = 0; in trylockInit()
26 void trylockRelease(struct TryLock *lock) in trylockRelease() argument
28 lock->lock = 0; in trylockRelease()
31 bool trylockTryTake(struct TryLock *lock) in trylockTryTake() argument
33 return !atomicXchgByte(&lock->lock, 1); in trylockTryTake()
/device/generic/goldfish/audio/
Dring_buffer.cpp36 std::unique_lock<std::mutex> lock(mMutex); in availableToConsume() local
41 std::unique_lock<std::mutex> lock(mMutex); in makeRoomForProduce() local
55 std::unique_lock<std::mutex> lock(mMutex); in waitForProduceAvailable() local
59 } else if (mProduceAvailable.wait_until(lock, blockUntil) == std::cv_status::timeout) { in waitForProduceAvailable()
66 std::unique_lock<std::mutex> lock(mMutex); in getProduceChunk() local
80 std::unique_lock<std::mutex> lock(mMutex); in produce() local
92 std::unique_lock<std::mutex> lock(mMutex); in produce() local
116 std::unique_lock<std::mutex> lock(mMutex); in waitForConsumeAvailable() local
120 } else if (mConsumeAvailable.wait_until(lock, blockUntil) == std::cv_status::timeout) { in waitForConsumeAvailable()
127 std::unique_lock<std::mutex> lock(mMutex); in getConsumeChunk() local
[all …]
/device/generic/goldfish-opengl/system/vulkan_enc/
Dvulkan_enc_unittests.cpp155 Lock lock; in TEST() local
163 [&lock, &cv, &x] { in TEST()
164 AutoLock l(lock); in TEST()
166 cv.wait(&lock); in TEST()
174 tasks2.push_back([&lock, &cv, &x] { in TEST()
175 AutoLock l(lock); in TEST()
193 Lock lock; in TEST() local
198 [&lock, &cv, &x] { in TEST()
199 AutoLock l(lock); in TEST()
201 cv.wait(&lock); in TEST()
[all …]
/device/linaro/dragonboard/audio/
Daudio_hw.c54 pthread_mutex_t lock; member
73 pthread_mutex_t lock; member
97 pthread_mutex_init (&audio_vbuffer->lock, (const pthread_mutexattr_t *) NULL); in audio_vbuffer_init()
106 pthread_mutex_destroy(&audio_vbuffer->lock); in audio_vbuffer_destroy()
114 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_live()
116 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_live()
123 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_write()
144 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_write()
150 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_read()
171 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_read()
[all …]
/device/google/cuttlefish/guest/hals/audio/
Daudio_hw.c57 pthread_mutex_t lock; member
76 pthread_mutex_t lock; member
100 pthread_mutex_init (&audio_vbuffer->lock, (const pthread_mutexattr_t *) NULL); in audio_vbuffer_init()
109 pthread_mutex_destroy(&audio_vbuffer->lock); in audio_vbuffer_destroy()
117 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_live()
119 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_live()
126 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_write()
147 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_write()
153 pthread_mutex_lock (&audio_vbuffer->lock); in audio_vbuffer_read()
174 pthread_mutex_unlock (&audio_vbuffer->lock); in audio_vbuffer_read()
[all …]
/device/generic/goldfish/gnss/
Ddata_sink.cpp23 std::unique_lock<std::mutex> lock(mtx); in gnssLocation() local
30 std::unique_lock<std::mutex> lock(mtx); in gnssSvStatus() local
37 std::unique_lock<std::mutex> lock(mtx); in gnssStatus() local
45 std::unique_lock<std::mutex> lock(mtx); in gnssNmea() local
52 std::unique_lock<std::mutex> lock(mtx); in setCallback20() local
57 std::unique_lock<std::mutex> lock(mtx); in cleanup() local
62 std::unique_lock<std::mutex> lock(mtx); in start() local
/device/generic/car/emulator/audio/driver/
Daudio_vbuffer.c44 pthread_mutex_init(&audio_vbuffer->lock, (const pthread_mutexattr_t *)NULL); in audio_vbuffer_init()
53 pthread_mutex_destroy(&audio_vbuffer->lock); in audio_vbuffer_destroy()
61 pthread_mutex_lock(&audio_vbuffer->lock); in audio_vbuffer_live()
63 pthread_mutex_unlock(&audio_vbuffer->lock); in audio_vbuffer_live()
71 pthread_mutex_lock(&audio_vbuffer->lock); in audio_vbuffer_dead()
73 pthread_mutex_unlock(&audio_vbuffer->lock); in audio_vbuffer_dead()
80 pthread_mutex_lock(&audio_vbuffer->lock); in audio_vbuffer_write()
104 pthread_mutex_unlock(&audio_vbuffer->lock); in audio_vbuffer_write()
111 pthread_mutex_lock(&audio_vbuffer->lock); in audio_vbuffer_read()
135 pthread_mutex_unlock(&audio_vbuffer->lock); in audio_vbuffer_read()
Daudio_hw.c115 pthread_mutex_lock(&out->lock); in out_dump()
135 pthread_mutex_unlock(&out->lock); in out_dump()
147 pthread_mutex_lock(&out->lock); in out_set_parameters()
167 pthread_mutex_unlock(&out->lock); in out_set_parameters()
181 pthread_mutex_lock(&out->lock); in out_get_parameters()
183 pthread_mutex_unlock(&out->lock); in out_get_parameters()
213 pthread_mutex_lock(&out->lock); in out_write_worker()
225 pthread_cond_wait(&out->worker_wake, &out->lock); in out_write_worker()
236 pthread_cond_wait(&out->worker_wake, &out->lock); in out_write_worker()
240 pthread_mutex_unlock(&out->lock); in out_write_worker()
[all …]
/device/generic/goldfish/fingerprint/
Dfingerprint.c91 pthread_mutex_t lock; member
249 pthread_mutex_lock(&qdev->lock); in fingerprint_get_auth_id()
251 pthread_mutex_unlock(&qdev->lock); in fingerprint_get_auth_id()
261 pthread_mutex_lock(&qdev->lock); in fingerprint_set_active_group()
278 pthread_mutex_unlock(&qdev->lock); in fingerprint_set_active_group()
294 pthread_mutex_lock(&qdev->lock); in fingerprint_authenticate()
297 pthread_mutex_unlock(&qdev->lock); in fingerprint_authenticate()
345 pthread_mutex_lock(&dev->lock); in fingerprint_enroll()
348 pthread_mutex_unlock(&dev->lock); in fingerprint_enroll()
373 pthread_mutex_lock(&qdev->lock); in fingerprint_pre_enroll()
[all …]
/device/google/contexthub/firmware/os/inc/
Dtrylock.h28 volatile uint8_t lock; member
34 void trylockInit(struct TryLock *lock);
35 void trylockRelease(struct TryLock *lock);
36 bool trylockTryTake(struct TryLock *lock); //true if we took it
/device/linaro/hikey/hifi/xaf/host-apf/include/os/android/
Dxf-osal.h54 static inline void __xf_lock_init(xf_lock_t *lock) in __xf_lock_init() argument
56 pthread_mutex_init(lock, NULL); in __xf_lock_init()
60 static inline void __xf_lock(xf_lock_t *lock) in __xf_lock() argument
62 pthread_mutex_lock(lock); in __xf_lock()
66 static inline void __xf_unlock(xf_lock_t *lock) in __xf_unlock() argument
68 pthread_mutex_unlock(lock); in __xf_unlock()
/device/linaro/hikey/hifi/xaf/host-apf/include/os/xos/
Dxf-osal.h47 static inline void __xf_lock_init(xf_lock_t *lock) in __xf_lock_init() argument
49 xos_mutex_create(lock, XOS_MUTEX_WAIT_PRIORITY, 0); in __xf_lock_init()
53 static inline void __xf_lock(xf_lock_t *lock) in __xf_lock() argument
55 xos_mutex_lock(lock); in __xf_lock()
59 static inline void __xf_unlock(xf_lock_t *lock) in __xf_unlock() argument
61 xos_mutex_unlock(lock); in __xf_unlock()
/device/google/cuttlefish/host/libs/wayland/
Dwayland_surface.cpp25 std::unique_lock<std::mutex> lock(state_mutex_); in SetRegion() local
30 std::unique_lock<std::mutex> lock(state_mutex_); in Attach() local
35 std::unique_lock<std::mutex> lock(state_mutex_); in Commit() local
40 std::unique_lock<std::mutex> lock(callback_mutex_); in Commit() local
72 std::unique_lock<std::mutex> lock(callback_mutex_); in OnFrameAfter() local
/device/linaro/hikey/hifi/xaf/host-apf/include/
Dxf-proxy.h173 xf_lock_t lock; member
198 __xf_lock(&proxy->lock); in xf_proxy_lock()
204 __xf_unlock(&proxy->lock); in xf_proxy_unlock()
244 xf_lock_t lock; member
278 __xf_lock(&handle->lock); in xf_lock()
284 __xf_unlock(&handle->lock); in xf_unlock()
/device/generic/goldfish-opengl/android-emu/android/base/threads/
DAndroidWorkPool.cpp83 AutoLock lock(mLock); in decrementBroadcast() local
214 AutoLock lock(mLock); in acquire() local
227 AutoLock lock(mLock); in run() local
251 AutoLock lock(mLock); in shouldCleanupWaitGroup() local
272 AutoLock lock(mLock); in exit() local
289 AutoLock lock(mLock); in threadFunc() local
294 AutoLock lock(mLock); in threadFunc() local
310 AutoLock lock(mLock); in doRun() local
343 AutoLock lock(mLock); in schedule() local
385 AutoLock lock(mLock); in waitAny() local
[all …]
/device/generic/goldfish/wifi/wifi_hal/
Dhalstate.cpp24 std::unique_lock<std::mutex> lock(mStateMutex); in init() local
51 std::unique_lock<std::mutex> lock(mStateMutex); in stop() local
81 std::unique_lock<std::mutex> lock(mStateMutex); in eventLoop() local
99 std::unique_lock<std::mutex> lock(mStateMutex); in onStop() local
/device/generic/goldfish-opengl/system/gralloc/
Dgralloc_old.cpp177 pthread_mutex_t lock; member
185 pthread_mutex_init(&lock, NULL); in gralloc_memregions_t()
189 pthread_mutex_t lock; member
201 pthread_mutex_init(&lock, NULL); in gralloc_dmaregion_t()
215 pthread_mutex_t lock; member
245 pthread_mutex_lock(&grdma->lock); in get_gralloc_region()
248 pthread_mutex_unlock(&grdma->lock); in get_gralloc_region()
292 pthread_mutex_lock(&grdma->lock); in put_gralloc_region()
300 pthread_mutex_unlock(&grdma->lock); in put_gralloc_region()
334 pthread_mutex_lock(&grdma->lock); in gralloc_dmaregion_register_ashmem()
[all …]
/device/google/cuttlefish/host/frontend/webrtc/lib/
Dws_connection.cpp187 std::lock_guard<std::mutex> lock(map_mutex_); in GetConnection() local
191 connection = weak_by_ptr_[raw].lock(); in GetConnection()
201 std::lock_guard<std::mutex> lock(map_mutex_); in RememberConnection() local
207 std::lock_guard<std::mutex> lock(map_mutex_); in ForgetConnection() local
237 auto observer = observer_.lock(); in OnError()
244 auto observer = observer_.lock(); in OnReceive()
250 auto observer = observer_.lock(); in OnOpen()
256 auto observer = observer_.lock(); in OnClose()
265 std::lock_guard<std::mutex> lock(write_queue_mutex_); in OnWriteable() local
288 std::lock_guard<std::mutex> lock(write_queue_mutex_); in Send() local
[all …]
/device/amlogic/yukawa/hal/audio/
Daudio_aec.c184 pthread_mutex_init(&aec->lock, NULL); in init_aec_interface()
193 pthread_mutex_lock(&aec->lock); in release_aec_interface()
196 pthread_mutex_unlock(&aec->lock); in release_aec_interface()
251 pthread_mutex_lock(&aec->lock); in init_aec_reference_config()
280 pthread_mutex_unlock(&aec->lock); in init_aec_reference_config()
291 pthread_mutex_lock(&aec->lock); in destroy_aec_reference_config()
293 pthread_mutex_unlock(&aec->lock); in destroy_aec_reference_config()
456 pthread_mutex_lock(&aec->lock); in init_aec_mic_config()
517 pthread_mutex_unlock(&aec->lock); in init_aec_mic_config()
529 pthread_mutex_unlock(&aec->lock); in init_aec_mic_config()
[all …]
Daudio_hw.c257 pthread_mutex_lock(&out->dev->lock); in out_standby()
258 pthread_mutex_lock(&out->lock); in out_standby()
260 pthread_mutex_unlock(&out->lock); in out_standby()
261 pthread_mutex_unlock(&out->dev->lock); in out_standby()
285 pthread_mutex_lock(&adev->lock); in out_set_parameters()
286 pthread_mutex_lock(&out->lock); in out_set_parameters()
291 pthread_mutex_unlock(&out->lock); in out_set_parameters()
292 pthread_mutex_unlock(&adev->lock); in out_set_parameters()
334 pthread_mutex_lock(&adev->lock); in out_write()
335 pthread_mutex_lock(&out->lock); in out_write()
[all …]
/device/generic/goldfish/sensors/
Dmultihal_sensors.cpp118 std::unique_lock<std::mutex> lock(m_mtx); in setOperationMode() local
134 std::unique_lock<std::mutex> lock(m_mtx); in activate() local
178 std::unique_lock<std::mutex> lock(m_mtx); in batch() local
194 std::unique_lock<std::mutex> lock(m_mtx); in flush() local
216 std::unique_lock<std::mutex> lock(m_mtx); in injectSensorData() local
231 std::unique_lock<std::mutex> lock(m_mtx); in initialize() local
242 std::unique_lock<std::mutex> lock(m_mtx); in postSensorEvent() local
282 std::unique_lock<std::mutex> lock(m_mtx); in batchThread() local
284 m_batchUpdated.wait(lock); in batchThread()
289 m_batchUpdated.wait_until(lock, waitUntil); in batchThread()

123456