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

/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:__anon501
[all...]
H A Dbench_pthread.c185 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; local
186 BENCH(pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex));
/system/core/libcutils/
H A Dmq.c136 * Acquire mutex before use.
144 pthread_mutex_t mutex; member in struct:__anon398
158 /** Keeps track of recently dead peers. Requires mutex. */
178 * Requires mutex.
256 pthread_mutex_lock(&peer->mutex);
261 pthread_mutex_unlock(&peer->mutex);
286 /** Adds a packet to the end of the queue. Callers must have the mutex. */
1108 if (pthread_mutex_init(&peer->mutex, &attributes) != 0) {

Completed in 109 milliseconds