Searched refs:mutex (Results 1 - 5 of 5) sorted by relevance
/system/core/include/utils/ |
H A D | Condition.h | 39 * 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 D | Mutex.h | 37 * 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...] |
/system/extras/tests/bionic/libc/common/ |
H A D | test_pthread_mutex.c | 110 /* perform a simple init/lock/unlock/destroy test on a mutex of given attributes */ 131 /* simple init/lock/unlock/destroy on all mutex types */ 260 * - main thread creates a mutex and locks it 264 * then unlock the mutex. 266 * - thread 1 locks() the mutex. It shall be stopped for a least 'waitDelay' 267 * seconds. It then unlocks the mutex. 269 * - thread 2 trylocks() the mutex. In case of failure (EBUSY), it waits 271 * it succeeds. It then unlocks the mutex. 276 * going to acquire the mutex first. 279 pthread_mutex_t mutex[ member in struct:__anon275 [all...] |
H A D | bench_pthread.c | 185 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; local 186 BENCH(pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex));
|
/system/core/libutils/ |
H A D | Threads.cpp | 409 ALOG(LOG_WARN, "thread", "WARNING: bad result from unlocking mutex\n"); 418 ALOG(LOG_WARN, "thread", "WARNING: bad result from try-locking mutex\n"); 445 * As an optimization they require acquiring the external mutex before 466 // This mutex wouldn't be necessary if we required that the caller 467 // lock the external mutex before calling signal() and broadcast(). 492 // Atomically release the external mutex and wait on the semaphore. 514 // internal mutex. 517 // can acquire the internal mutex. We want to do this in one step 518 // because it ensures that everybody is in the mutex FIFO before 524 // Grab the internal mutex [all...] |
Completed in 116 milliseconds