Home
last modified time | relevance | path

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

/frameworks/native/include/utils/
DCondition.h60 status_t wait(Mutex& mutex);
62 status_t waitRelative(Mutex& mutex, nsecs_t reltime);
105 inline status_t Condition::wait(Mutex& mutex) { in wait() argument
106 return -pthread_cond_wait(&mCond, &mutex.mMutex); in wait()
108 inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) { in waitRelative() argument
113 return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts); in waitRelative()
131 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts); in waitRelative()
DMutex.h65 inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); } in Autolock() argument
66 inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); } in Autolock() argument
/frameworks/av/libvideoeditor/osal/src/
DM4OSA_Mutex.c37 pthread_mutex_t mutex; /* mutex */ member
85 if (0 == pthread_mutex_init( &pMutexContext->mutex, &attribute ) ) in M4OSA_mutexOpen()
156 if ( 0 != pthread_mutex_lock(&pMutexContext->mutex) ) in M4OSA_mutexLock()
164 result = pthread_mutex_trylock(&pMutexContext->mutex); in M4OSA_mutexLock()
179 result = pthread_mutex_trylock(&pMutexContext->mutex); in M4OSA_mutexLock()
237 pthread_mutex_unlock(&pMutexContext->mutex); in M4OSA_mutexUnlock()
269 pthread_mutex_destroy(&pMutexContext->mutex); in M4OSA_mutexClose()
/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/examples/
DslesTestFeedback.cpp59 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
66 pthread_mutex_lock(&mutex); in recorderCallback()
116 pthread_mutex_unlock(&mutex); in recorderCallback()
125 pthread_mutex_lock(&mutex); in playerCallback()
170 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.cpp132 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
152 pthread_mutex_lock(&mutex); in create()
180 pthread_mutex_unlock(&mutex); in create()
233 pthread_mutex_lock(&mutex); in ~AudioResampler()
241 pthread_mutex_unlock(&mutex); in ~AudioResampler()
DAudioFlinger.h306 static bool dumpTryLock(Mutex& mutex);
DAudioPolicyService.cpp550 static bool tryLock(Mutex& mutex) in tryLock() argument
554 if (mutex.tryLock() == NO_ERROR) { in tryLock()
DAudioFlinger.cpp301 bool AudioFlinger::dumpTryLock(Mutex& mutex) in dumpTryLock() argument
305 if (mutex.tryLock() == NO_ERROR) { in dumpTryLock()
/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/native/include/ui/
DFramebufferNativeWindow.h84 mutable Mutex mutex; variable
/frameworks/native/libs/utils/
DThreads.cpp600 status_t Condition::wait(Mutex& mutex)
603 HANDLE hMutex = (HANDLE) mutex.mState;
608 status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime)
611 HANDLE hMutex = (HANDLE) mutex.mState;
/frameworks/av/services/camera/libcameraservice/
DCameraService.cpp985 static bool tryLock(Mutex& mutex) in tryLock() argument
989 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