Home
last modified time | relevance | path

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

12

/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.cpp216 Mutex::Autolock _l(mutex); in getCurrentBufferIndex()
240 Mutex::Autolock _l(self->mutex); in dequeueBuffer()
248 self->mCondition.wait(self->mutex); in dequeueBuffer()
278 Mutex::Autolock _l(self->mutex); in queueBuffer()
296 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/av/services/camera/libcameraservice/utils/
DAutoConditionLock.cpp21 WaitableMutexWrapper::WaitableMutexWrapper(Mutex* mutex) : mMutex{mutex}, mState{false} {} in WaitableMutexWrapper() argument
DAutoConditionLock.h40 WaitableMutexWrapper(Mutex* mutex);
/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.c64 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
120 ok = pthread_mutex_lock(&mutex); in prefetchStatusCallback()
125 ok = pthread_mutex_unlock(&mutex); in prefetchStatusCallback()
580 pthread_mutex_lock(&mutex); in main()
582 pthread_cond_wait(&cond, &mutex); in main()
584 pthread_mutex_unlock(&mutex); in main()
Dmultithread.c40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
/frameworks/av/services/audioflinger/
DAudioResampler.cpp143 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
173 pthread_mutex_lock(&mutex); in create()
209 pthread_mutex_unlock(&mutex); in create()
283 pthread_mutex_lock(&mutex); in ~AudioResampler()
291 pthread_mutex_unlock(&mutex); in ~AudioResampler()
DAudioFlinger.h405 static bool dumpTryLock(Mutex& mutex);
DAudioFlinger.cpp367 bool AudioFlinger::dumpTryLock(Mutex& mutex) in dumpTryLock() argument
371 if (mutex.tryLock() == NO_ERROR) { in dumpTryLock()
/frameworks/wilhelm/tests/examples/
DslesTestFeedback.cpp62 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
76 pthread_mutex_lock(&mutex); in recorderCallback()
157 pthread_mutex_unlock(&mutex); in recorderCallback()
166 pthread_mutex_lock(&mutex); in playerCallback()
251 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()
760 pthread_mutex_lock(&mutex); in TestDecToBuffQueue()
762 pthread_cond_wait(&cond, &mutex); in TestDecToBuffQueue()
764 pthread_mutex_unlock(&mutex); in TestDecToBuffQueue()
/frameworks/native/include/ui/
DFramebufferNativeWindow.h88 mutable Mutex mutex; variable
/frameworks/base/libs/hwui/renderthread/
DRenderProxy.cpp512 Mutex mutex; in staticPostAndWait() local
514 SignalingRenderTask syncTask(task, &mutex, &condition); in staticPostAndWait()
515 AutoMutex _lock(mutex); in staticPostAndWait()
517 condition.wait(mutex); in staticPostAndWait()
/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/radio/
DRadioService.cpp158 static bool tryLock(Mutex& mutex) in tryLock() argument
162 if (mutex.tryLock() == NO_ERROR) { in tryLock()
/frameworks/base/services/core/java/com/android/server/notification/
DManagedServices.java100 public ManagedServices(Context context, Handler handler, Object mutex, in ManagedServices() argument
103 mMutex = mutex; in ManagedServices()
/frameworks/av/services/audiopolicy/service/
DAudioPolicyService.cpp311 static bool tryLock(Mutex& mutex) in tryLock() argument
315 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
/frameworks/av/services/camera/libcameraservice/
DCameraService.cpp2192 static bool tryLock(Mutex& mutex) in tryLock() argument
2196 if (mutex.tryLock() == NO_ERROR) { in tryLock()

12