Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 22 of 22) sorted by relevance

/frameworks/base/libs/usb/tests/accessorytest/
Daudio.c47 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
58 pthread_mutex_lock(&mutex); in get_empty()
61 pthread_cond_wait(&empty_cond, &mutex); in get_empty()
71 pthread_mutex_unlock(&mutex); in get_empty()
77 pthread_mutex_lock(&mutex); in put_empty()
85 pthread_mutex_unlock(&mutex); in put_empty()
92 pthread_mutex_lock(&mutex); in get_full()
95 pthread_cond_wait(&full_cond, &mutex); in get_full()
105 pthread_mutex_unlock(&mutex); in get_full()
111 pthread_mutex_lock(&mutex); in put_full()
[all …]
Dhid.c37 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
84 pthread_mutex_lock(&mutex); in hid_thread()
106 pthread_mutex_unlock(&mutex); in hid_thread()
/frameworks/wilhelm/tests/mimeUri/
DslesTestLoopUri.cpp39 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
92 ok = pthread_mutex_lock(&mutex); in PrefetchEventCallback()
97 ok = pthread_mutex_unlock(&mutex); in PrefetchEventCallback()
241 pthread_mutex_lock(&mutex); in TestLoopUri()
243 pthread_cond_wait(&cond, &mutex); in TestLoopUri()
245 pthread_mutex_unlock(&mutex); in TestLoopUri()
DslesTestSlowDownUri.cpp41 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
137 ok = pthread_mutex_lock(&mutex); in PrefetchEventCallback()
142 ok = pthread_mutex_unlock(&mutex); in PrefetchEventCallback()
343 pthread_mutex_lock(&mutex); in TestSlowDownUri()
345 pthread_cond_wait(&cond, &mutex); in TestSlowDownUri()
347 pthread_mutex_unlock(&mutex); in TestSlowDownUri()
/frameworks/wilhelm/tests/listening/
DslesTest_playMuteSolo.cpp58 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
91 ok = pthread_mutex_lock(&mutex); in prefetch_callback()
96 ok = pthread_mutex_unlock(&mutex); in prefetch_callback()
313 pthread_mutex_lock(&mutex); in TestPlayUri()
315 pthread_cond_wait(&cond, &mutex); in TestPlayUri()
317 pthread_mutex_unlock(&mutex); in TestPlayUri()
/frameworks/native/libs/ui/
DFramebufferNativeWindow.cpp215 Mutex::Autolock _l(mutex); in getCurrentBufferIndex()
239 Mutex::Autolock _l(self->mutex); in dequeueBuffer()
248 self->mCondition.wait(self->mutex); in dequeueBuffer()
278 Mutex::Autolock _l(self->mutex); in queueBuffer()
297 Mutex::Autolock _l(self->mutex); in query()
/frameworks/wilhelm/tests/native-media/jni/
Dnative-media-jni.c76 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
109 ok = pthread_mutex_lock(&mutex); in AndroidBufferQueueCallback()
219 ok = pthread_mutex_unlock(&mutex); in AndroidBufferQueueCallback()
530 ok = pthread_mutex_lock(&mutex); in Java_com_example_nativemedia_NativeMedia_rewindStreamingMediaPlayer()
536 ok = pthread_cond_wait(&cond, &mutex); in Java_com_example_nativemedia_NativeMedia_rewindStreamingMediaPlayer()
539 ok = pthread_mutex_unlock(&mutex); in Java_com_example_nativemedia_NativeMedia_rewindStreamingMediaPlayer()
/frameworks/wilhelm/tests/sandbox/
Dreverb.c178 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
211 ok = pthread_mutex_lock(&mutex); in prefetch_callback()
216 ok = pthread_mutex_unlock(&mutex); in prefetch_callback()
612 pthread_mutex_lock(&mutex); in main()
614 pthread_cond_wait(&cond, &mutex); in main()
616 pthread_mutex_unlock(&mutex); in main()
Dxaplay.c63 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
119 ok = pthread_mutex_lock(&mutex); in prefetchStatusCallback()
124 ok = pthread_mutex_unlock(&mutex); in prefetchStatusCallback()
579 pthread_mutex_lock(&mutex); in main()
581 pthread_cond_wait(&cond, &mutex); in main()
583 pthread_mutex_unlock(&mutex); in main()
Dmultithread.c40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
/frameworks/wilhelm/tests/examples/
DslesTestFeedback.cpp62 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
72 pthread_mutex_lock(&mutex); in recorderCallback()
143 pthread_mutex_unlock(&mutex); in recorderCallback()
152 pthread_mutex_lock(&mutex); in playerCallback()
222 pthread_mutex_unlock(&mutex); in playerCallback()
DslesTestDecodeAac.cpp135 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
182 ok = pthread_mutex_lock(&mutex); in PrefetchEventCallback()
187 ok = pthread_mutex_unlock(&mutex); in PrefetchEventCallback()
759 pthread_mutex_lock(&mutex); in TestDecToBuffQueue()
761 pthread_cond_wait(&cond, &mutex); in TestDecToBuffQueue()
763 pthread_mutex_unlock(&mutex); in TestDecToBuffQueue()
/frameworks/av/services/audioflinger/
DAudioResampler.cpp146 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
176 pthread_mutex_lock(&mutex); in create()
212 pthread_mutex_unlock(&mutex); in create()
286 pthread_mutex_lock(&mutex); in ~AudioResampler()
294 pthread_mutex_unlock(&mutex); in ~AudioResampler()
DAudioFlinger.h388 static bool dumpTryLock(Mutex& mutex);
DAudioFlinger.cpp364 bool AudioFlinger::dumpTryLock(Mutex& mutex) in dumpTryLock() argument
368 if (mutex.tryLock() == NO_ERROR) { in dumpTryLock()
/frameworks/base/libs/hwui/renderthread/
DRenderProxy.cpp226 Mutex mutex; in invokeFunctor() local
228 SignalingRenderTask syncTask(task, &mutex, &condition); in invokeFunctor()
229 AutoMutex _lock(mutex); in invokeFunctor()
231 condition.wait(mutex); in invokeFunctor()
/frameworks/native/include/ui/
DFramebufferNativeWindow.h86 mutable Mutex mutex; variable
/frameworks/base/services/core/java/com/android/server/notification/
DManagedServices.java94 public ManagedServices(Context context, Handler handler, Object mutex, in ManagedServices() argument
97 mMutex = mutex; in ManagedServices()
/frameworks/av/services/soundtrigger/
DSoundTriggerHwService.cpp177 static bool tryLock(Mutex& mutex) in tryLock() argument
181 if (mutex.tryLock() == NO_ERROR) { in tryLock()
/frameworks/av/services/audiopolicy/
DAudioPolicyService.cpp266 static bool tryLock(Mutex& mutex) in tryLock() argument
270 if (mutex.tryLock() == NO_ERROR) { in tryLock()
/frameworks/av/services/camera/libcameraservice/
DCameraService.cpp1595 static bool tryLock(Mutex& mutex) in tryLock() argument
1599 if (mutex.tryLock() == NO_ERROR) { in tryLock()
/frameworks/base/docs/html/training/articles/
Dsmp.jd1081 pthread mutex) rather than an atomic operation, but we will employ the latter to
1214 mutex). If the recycle function used a lock-free algorithm implemented without
1472 corresponding mutex.</p>
1475 unlocking a pthread mutex require a single atomic operation each if there’s no
1476 contention, so you’re not going to save much by replacing mutex calls with
1524 before it unlocks a mutex will be observable by another thread after it locks
1525 that same mutex. It also guarantees that any accesses made before calling