Searched defs:mutex (Results 1 - 3 of 3) sorted by relevance

/system/core/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...]
/system/extras/tests/bionic/libc/common/
H A Dtest_pthread_mutex.c110 /* 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:__anon266
[all...]

Completed in 113 milliseconds