Searched refs:mutex (Results 1 - 5 of 5) sorted by relevance
/bionic/benchmarks/ |
H A D | pthread_benchmark.cpp | 69 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; local 73 pthread_mutex_lock(&mutex); 74 pthread_mutex_unlock(&mutex); 83 pthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER; local 87 pthread_mutex_lock(&mutex); 88 pthread_mutex_unlock(&mutex); 97 pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER; local 101 pthread_mutex_lock(&mutex); 102 pthread_mutex_unlock(&mutex);
|
/bionic/libc/bionic/ |
H A D | pthread_mutex.cpp | 42 extern void pthread_debug_mutex_lock_check(pthread_mutex_t *mutex); 43 extern void pthread_debug_mutex_unlock_check(pthread_mutex_t *mutex); 45 /* a mutex is implemented as a 32-bit integer holding the following fields 49 * 15-14 type mutex type 93 /* return true iff the mutex if locked with no waiters */ 96 /* return true iff the mutex if locked with maybe waiters */ 122 * This flag is set to indicate that the mutex is shared among processes. 191 * These are used to form or modify the bit pattern of a given mutex value 196 /* a mutex attribute holds the following fields 199 * 0-3 type type of mutex 266 pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* attr) argument 308 _normal_lock(pthread_mutex_t* mutex, int shared) argument 347 _normal_unlock(pthread_mutex_t* mutex, int shared) argument 409 _recursive_increment(pthread_mutex_t* mutex, int mvalue, int mtype) argument 442 pthread_mutex_lock(pthread_mutex_t* mutex) argument 524 pthread_mutex_unlock(pthread_mutex_t* mutex) argument 582 pthread_mutex_trylock(pthread_mutex_t* mutex) argument 622 __pthread_mutex_timedlock(pthread_mutex_t* mutex, const timespec* abs_timeout, clockid_t clock) argument 724 pthread_mutex_lock_timeout_np(pthread_mutex_t* mutex, unsigned ms) argument 742 pthread_mutex_timedlock(pthread_mutex_t* mutex, const timespec* abs_timeout) argument 746 pthread_mutex_destroy(pthread_mutex_t* mutex) argument [all...] |
H A D | pthread_cond.cpp | 104 // XXX after unlocking the mutex and before waiting, and if other 139 // code will issue any necessary barriers when locking the mutex. 142 // recommended practice and holds the mutex before signaling the cond 143 // var, the mutex ops will provide correct semantics. If they don't 144 // hold the mutex, they're subject to race conditions anyway. 152 int __pthread_cond_timedwait_relative(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* reltime) { argument 155 pthread_mutex_unlock(mutex); 157 pthread_mutex_lock(mutex); 166 int __pthread_cond_timedwait(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime, clockid_t clock) { argument 179 return __pthread_cond_timedwait_relative(cond, mutex, ts 190 pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex) argument 194 pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t * mutex, const timespec *abstime) argument 200 pthread_cond_timedwait_monotonic(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime) argument 204 pthread_cond_timedwait_monotonic_np(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime) argument 208 pthread_cond_timedwait_relative_np(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* reltime) argument 212 pthread_cond_timeout_np(pthread_cond_t* cond, pthread_mutex_t* mutex, unsigned ms) argument [all...] |
/bionic/tests/ |
H A D | pthread_test.cpp | 237 pthread_mutex_t mutex; member in struct:TestBug37410 242 ASSERT_EQ(0, pthread_mutex_init(&data.mutex, NULL)); 243 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); 249 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); 250 ASSERT_EQ(0, pthread_mutex_unlock(&data.mutex)); 261 pthread_mutex_unlock(&data->mutex); 803 // If the mutex is already locked, pthread_mutex_timedlock should time out. 811 // If the mutex is unlocked, pthread_mutex_timedlock should succeed.
|
/bionic/libc/upstream-dlmalloc/ |
H A D | malloc.c | 115 pthread mutex, win32 critical section, or a spin-lock if if 264 pthread or WIN32 mutex lock/unlock. (If set true, this can be 2561 If USE_LOCKS is defined, the "mutex" lock is acquired and released 2597 MLOCK_T mutex; /* locate lock among fields that rarely change */ member in struct:malloc_state 2743 #define PREACTION(M) ((use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0) 2744 #define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); } 3095 static void pre_fork(void) { ACQUIRE_LOCK(&(gm)->mutex); } 3096 static void post_fork_parent(void) { RELEASE_LOCK(&(gm)->mutex); } 3097 static void post_fork_child(void) { INITIAL_LOCK(&(gm)->mutex); } 3160 (void)INITIAL_LOCK(&gm->mutex); [all...] |
Completed in 199 milliseconds