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

/frameworks/native/include/utils/
H A DCondition.h39 * Condition variables are paired up with mutexes. Lock the mutex,
41 * or unlock the mutex and continue. All threads calling wait() must
42 * use the same mutex for a given Condition.
59 // Wait on the condition variable. Lock the mutex before calling.
60 status_t wait(Mutex& mutex);
62 status_t waitRelative(Mutex& mutex, nsecs_t reltime);
105 inline status_t Condition::wait(Mutex& mutex) { argument
106 return -pthread_cond_wait(&mCond, &mutex.mMutex);
108 inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) { argument
113 return -pthread_cond_timedwait_relative_np(&mCond, &mutex
[all...]
H A DMutex.h37 * Simple mutex class. The implementation is system-dependent.
39 * The mutex must be unlocked by the thread that locked it. They are not
54 // lock or unlock the mutex
61 // Manages the mutex automatically. It'll be locked when Autolock is
65 inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); } argument
66 inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); } argument
75 // A mutex cannot be copied
126 * Automatic mutex
[all...]
/frameworks/av/libvideoeditor/osal/src/
H A DM4OSA_Mutex.c19 * @note This file implements functions to manipulate mutex
33 /* Context for the mutex */
36 M4OSA_UInt32 coreID; /* mutex context identifiant */
37 pthread_mutex_t mutex; /* mutex */ member in struct:__anon91
45 * @brief This method creates a new mutex.
49 * will be sent back to any OSAL core mutex functions to allow
50 * retrieving data associated to the opened mutex.
51 * @param pContext:(OUT) Context of the created mutex
70 M4OSA_MUTEX, (M4OSA_Char*)"M4OSA_mutexOpen: mutex contex
[all...]
/frameworks/wilhelm/tests/mimeUri/
H A DslesTestLoopUri.cpp39 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
92 ok = pthread_mutex_lock(&mutex);
97 ok = pthread_mutex_unlock(&mutex);
241 pthread_mutex_lock(&mutex);
243 pthread_cond_wait(&cond, &mutex);
245 pthread_mutex_unlock(&mutex);
H A DslesTestSlowDownUri.cpp41 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
137 ok = pthread_mutex_lock(&mutex);
142 ok = pthread_mutex_unlock(&mutex);
343 pthread_mutex_lock(&mutex);
345 pthread_cond_wait(&cond, &mutex);
347 pthread_mutex_unlock(&mutex);
/frameworks/wilhelm/tests/listening/
H A DslesTest_playMuteSolo.cpp58 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
91 ok = pthread_mutex_lock(&mutex);
96 ok = pthread_mutex_unlock(&mutex);
313 pthread_mutex_lock(&mutex);
315 pthread_cond_wait(&cond, &mutex);
317 pthread_mutex_unlock(&mutex);
/frameworks/native/include/ui/
H A DFramebufferNativeWindow.h84 mutable Mutex mutex; member in class:android::FramebufferNativeWindow
/frameworks/native/libs/ui/
H A DFramebufferNativeWindow.cpp215 Mutex::Autolock _l(mutex);
239 Mutex::Autolock _l(self->mutex);
248 self->mCondition.wait(self->mutex);
278 Mutex::Autolock _l(self->mutex);
297 Mutex::Autolock _l(self->mutex);
/frameworks/wilhelm/tests/native-media/jni/
H A Dnative-media-jni.c76 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
108 // note there is never any contention on this mutex unless a discontinuity request is active
109 ok = pthread_mutex_lock(&mutex);
219 ok = pthread_mutex_unlock(&mutex);
530 ok = pthread_mutex_lock(&mutex);
536 ok = pthread_cond_wait(&cond, &mutex);
539 ok = pthread_mutex_unlock(&mutex);
/frameworks/av/services/audioflinger/
H A DAudioResampler.cpp132 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; member in namespace:android
152 pthread_mutex_lock(&mutex);
180 pthread_mutex_unlock(&mutex);
233 pthread_mutex_lock(&mutex);
241 pthread_mutex_unlock(&mutex);
H A DAudioFlinger.h306 static bool dumpTryLock(Mutex& mutex);
H A DAudioPolicyService.cpp550 static bool tryLock(Mutex& mutex) argument
554 if (mutex.tryLock() == NO_ERROR) {
H A DAudioFlinger.cpp301 bool AudioFlinger::dumpTryLock(Mutex& mutex) argument
305 if (mutex.tryLock() == NO_ERROR) {
2012 // mutex below, the call to checkPlaybackThread_l(io) below will detect it
/frameworks/wilhelm/tests/examples/
H A DslesTestFeedback.cpp59 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
66 pthread_mutex_lock(&mutex);
116 pthread_mutex_unlock(&mutex);
125 pthread_mutex_lock(&mutex);
170 pthread_mutex_unlock(&mutex);
H A DslesTestDecodeAac.cpp135 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
182 ok = pthread_mutex_lock(&mutex);
187 ok = pthread_mutex_unlock(&mutex);
241 // mutex on all global variables
321 // mutex on all global variables
759 pthread_mutex_lock(&mutex);
761 pthread_cond_wait(&cond, &mutex);
763 pthread_mutex_unlock(&mutex);
/frameworks/wilhelm/tests/sandbox/
H A Dreverb.c178 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
211 ok = pthread_mutex_lock(&mutex);
216 ok = pthread_mutex_unlock(&mutex);
612 pthread_mutex_lock(&mutex);
614 pthread_cond_wait(&cond, &mutex);
616 pthread_mutex_unlock(&mutex);
H A Dmultithread.c40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
44 //pthread_mutex_lock(&mutex);
45 //pthread_mutex_unlock(&mutex);
153 //pthread_mutex_lock(&mutex);
154 //pthread_mutex_unlock(&mutex);
H A Dxaplay.c63 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable
119 ok = pthread_mutex_lock(&mutex);
124 ok = pthread_mutex_unlock(&mutex);
579 pthread_mutex_lock(&mutex);
581 pthread_cond_wait(&cond, &mutex);
583 pthread_mutex_unlock(&mutex);
/frameworks/native/libs/utils/
H A DThreads.cpp439 ALOG(LOG_WARN, "thread", "WARNING: bad result from unlocking mutex\n");
448 ALOG(LOG_WARN, "thread", "WARNING: bad result from try-locking mutex\n");
475 * As an optimization they require acquiring the external mutex before
496 // This mutex wouldn't be necessary if we required that the caller
497 // lock the external mutex before calling signal() and broadcast().
522 // Atomically release the external mutex and wait on the semaphore.
544 // internal mutex.
547 // can acquire the internal mutex. We want to do this in one step
548 // because it ensures that everybody is in the mutex FIFO before
554 // Grab the internal mutex
[all...]
/frameworks/wilhelm/src/
H A DAndroid.mk48 # enable mutex deadlock detection
50 # or -UUSE_DEBUG for no mutex deadlock detection
/frameworks/av/services/camera/libcameraservice/
H A DCameraService.cpp430 // important: release the mutex here so the client can call back
506 // important: release the mutex here so the client can call back
985 static bool tryLock(Mutex& mutex) argument
989 if (mutex.tryLock() == NO_ERROR) {

Completed in 8444 milliseconds