/nptl/ |
A D | test-mutex-printers.c | 43 pthread_mutex_t mutex; in main() local 64 if (pthread_mutex_init (mutex, NULL) == 0 in test_status_destroyed() 65 && pthread_mutex_destroy (mutex) == 0) in test_status_destroyed() 80 && pthread_mutex_unlock (mutex) == 0 in test_status_no_robust() 81 && pthread_mutex_destroy (mutex) == 0) in test_status_no_robust() 113 && pthread_mutex_unlock (mutex) == 0) in test_locking_state_robust() 141 && pthread_mutex_lock (mutex) == 0 in test_recursive_locks() 142 && pthread_mutex_lock (mutex) == 0 in test_recursive_locks() 144 && pthread_mutex_unlock (mutex) == 0 in test_recursive_locks() 145 && pthread_mutex_unlock (mutex) == 0 in test_recursive_locks() [all …]
|
A D | pthread_mutex_cond_lock.c | 3 #define LLL_MUTEX_LOCK(mutex) \ argument 4 lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)) 5 #define LLL_MUTEX_LOCK_OPTIMIZED(mutex) LLL_MUTEX_LOCK (mutex) argument 8 #define LLL_MUTEX_LOCK_ELISION(mutex) \ argument 9 ({ lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); 0; }) 11 #define LLL_MUTEX_TRYLOCK(mutex) \ argument 12 lll_cond_trylock ((mutex)->__data.__lock) 13 #define LLL_MUTEX_TRYLOCK_ELISION(mutex) LLL_MUTEX_TRYLOCK(mutex) argument
|
A D | pthread_mutex_unlock.c | 41 mutex->__data.__lock = 0; in lll_mutex_unlock_optimized() 62 mutex->__data.__owner = 0; in __pthread_mutex_unlock_usercnt() 65 --mutex->__data.__nusers; in __pthread_mutex_unlock_usercnt() 77 return lll_unlock_elision (mutex->__data.__lock, mutex->__data.__elision, in __pthread_mutex_unlock_usercnt() 123 if (--mutex->__data.__count != 0) in libc_hidden_def() 162 DEQUEUE_MUTEX (mutex); in libc_hidden_def() 167 --mutex->__data.__nusers; in libc_hidden_def() 263 DEQUEUE_MUTEX (mutex); in libc_hidden_def() 270 --mutex->__data.__nusers; in libc_hidden_def() 328 mutex->__data.__owner = 0; in libc_hidden_def() [all …]
|
A D | pthread_mutex_lock.c | 46 mutex->__data.__lock = 1; in lll_mutex_lock_optimized() 52 lll_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)) 53 # define LLL_MUTEX_LOCK_OPTIMIZED(mutex) lll_mutex_lock_optimized (mutex) argument 58 lll_lock_elision ((mutex)->__data.__lock, (mutex)->__data.__elision, \ 61 lll_trylock_elision((mutex)->__data.__lock, (mutex)->__data.__elision, \ 122 ++mutex->__data.__count; in PTHREAD_MUTEX_LOCK() 145 LLL_MUTEX_LOCK (mutex); in PTHREAD_MUTEX_LOCK() 154 mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8; in PTHREAD_MUTEX_LOCK() 173 ++mutex->__data.__nusers; in PTHREAD_MUTEX_LOCK() 410 ++mutex->__data.__count; in __pthread_mutex_lock_full() [all …]
|
A D | test-mutexattr-printers.c | 50 pthread_mutex_t mutex; in main() local 72 if (pthread_mutex_destroy (mutex) == 0 in mutex_reinit() 86 && mutex_reinit (mutex, attr) == 0 in test_settype() 88 && mutex_reinit (mutex, attr) == 0 in test_settype() 90 && mutex_reinit (mutex, attr) == 0) in test_settype() 103 && mutex_reinit (mutex, attr) == 0 in test_setrobust() 105 && mutex_reinit (mutex, attr) == 0) in test_setrobust() 118 && mutex_reinit (mutex, attr) == 0 in test_setpshared() 120 && mutex_reinit (mutex, attr) == 0) in test_setpshared() 135 && mutex_reinit (mutex, attr) == 0 in test_setprotocol() [all …]
|
A D | pthread_mutex_trylock.c | 47 ++mutex->__data.__count; in ___pthread_mutex_trylock() 54 mutex->__data.__owner = id; in ___pthread_mutex_trylock() 55 mutex->__data.__count = 1; in ___pthread_mutex_trylock() 56 ++mutex->__data.__nusers; in ___pthread_mutex_trylock() 157 ++mutex->__data.__count; in ___pthread_mutex_trylock() 194 ENQUEUE_MUTEX (mutex); in ___pthread_mutex_trylock() 262 ++mutex->__data.__count; in ___pthread_mutex_trylock() 321 ENQUEUE_MUTEX (mutex); in ___pthread_mutex_trylock() 361 ++mutex->__data.__nusers; in ___pthread_mutex_trylock() 393 ++mutex->__data.__count; in ___pthread_mutex_trylock() [all …]
|
A D | pthread_mutex_timedlock.c | 59 ++mutex->__data.__count; in __pthread_mutex_clocklock_common() 96 mutex->__data.__spins, in __pthread_mutex_clocklock_common() 120 mutex->__data.__spins += (cnt - mutex->__data.__spins) / 8; in __pthread_mutex_clocklock_common() 176 ENQUEUE_MUTEX (mutex); in __pthread_mutex_clocklock_common() 213 ++mutex->__data.__count; in __pthread_mutex_clocklock_common() 269 mutex->__data.__count = 0; in __pthread_mutex_clocklock_common() 282 ENQUEUE_MUTEX (mutex); in __pthread_mutex_clocklock_common() 345 ++mutex->__data.__count; in __pthread_mutex_clocklock_common() 433 mutex->__data.__count = 1; in __pthread_mutex_clocklock_common() 473 ++mutex->__data.__count; in __pthread_mutex_clocklock_common() [all …]
|
A D | pthread_mutex_setprioceiling.c | 32 if ((atomic_load_relaxed (&(mutex->__data.__kind)) in __pthread_mutex_setprioceiling() 53 int kind = PTHREAD_MUTEX_TYPE (mutex); in __pthread_mutex_setprioceiling() 54 if (mutex->__data.__owner == THREAD_GETMEM (THREAD_SELF, tid)) in __pthread_mutex_setprioceiling() 63 int oldval = mutex->__data.__lock; in __pthread_mutex_setprioceiling() 71 oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, in __pthread_mutex_setprioceiling() 79 = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, in __pthread_mutex_setprioceiling() 88 PTHREAD_MUTEX_PSHARED (mutex)); in __pthread_mutex_setprioceiling() 90 while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock, in __pthread_mutex_setprioceiling() 114 mutex->__data.__lock = newlock in __pthread_mutex_setprioceiling() 118 futex_wake ((unsigned int *)&mutex->__data.__lock, INT_MAX, in __pthread_mutex_setprioceiling() [all …]
|
A D | pthread_mutex_destroy.c | 25 ___pthread_mutex_destroy (pthread_mutex_t *mutex) in ___pthread_mutex_destroy() argument 27 LIBC_PROBE (mutex_destroy, 1, mutex); in ___pthread_mutex_destroy() 31 if ((atomic_load_relaxed (&(mutex->__data.__kind)) in ___pthread_mutex_destroy() 33 && mutex->__data.__nusers != 0) in ___pthread_mutex_destroy() 39 atomic_store_relaxed (&(mutex->__data.__kind), -1); in ___pthread_mutex_destroy()
|
A D | descr.h | 199 # define ENQUEUE_MUTEX_BOTH(mutex, val) \ argument 214 # define DEQUEUE_MUTEX(mutex) \ argument 227 mutex->__data.__list.__prev = NULL; \ 228 mutex->__data.__list.__next = NULL; \ 239 mutex->__data.__list.__next \ 246 # define DEQUEUE_MUTEX(mutex) \ argument 250 if (runp == &mutex->__data.__list) \ 256 while (next != &mutex->__data.__list) \ 266 mutex->__data.__list.__next = NULL; \ 270 #define ENQUEUE_MUTEX(mutex) ENQUEUE_MUTEX_BOTH (mutex, 0) argument [all …]
|
A D | tst-setuid2.c | 28 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 39 int ret = pthread_mutex_lock (&mutex); in thread_func() 48 ret = pthread_mutex_unlock (&mutex); in thread_func() 52 ret = pthread_mutex_lock (&mutex); in thread_func() 60 ret = pthread_cond_wait (&cond_send, &mutex); in thread_func() 70 int ret = pthread_mutex_lock (&mutex); in run_on_thread() 74 ret = pthread_mutex_unlock (&mutex); in run_on_thread() 82 ret = pthread_mutex_lock (&mutex); in run_on_thread() 88 ret = pthread_cond_wait (&cond_recv, &mutex); in run_on_thread() 92 ret = pthread_mutex_unlock (&mutex); in run_on_thread()
|
A D | pthread_mutex_consistent.c | 23 __pthread_mutex_consistent (pthread_mutex_t *mutex) in __pthread_mutex_consistent() argument 28 if ((atomic_load_relaxed (&(mutex->__data.__kind)) in __pthread_mutex_consistent() 30 || mutex->__data.__owner != PTHREAD_MUTEX_INCONSISTENT) in __pthread_mutex_consistent() 33 mutex->__data.__owner = THREAD_GETMEM (THREAD_SELF, tid); in __pthread_mutex_consistent()
|
A D | tst-pthread-timedlock-lockloop.c | 38 static pthread_mutex_t mutex; variable 58 int ret = pthread_mutex_timedlock (&mutex, &abs_time); in worker_timedlock() 61 xpthread_mutex_unlock (&mutex); in worker_timedlock() 76 int ret = pthread_mutex_clocklock (&mutex, clockid, &time); in worker_clocklock() 79 xpthread_mutex_unlock (&mutex); in worker_clocklock() 110 xpthread_mutex_lock (&mutex); in run_test_set() 115 xpthread_mutex_unlock (&mutex); in run_test_set() 128 xpthread_mutex_init (&mutex, NULL); in do_test()
|
A D | pthread_mutex_getprioceiling.c | 24 __pthread_mutex_getprioceiling (const pthread_mutex_t *mutex, int *prioceiling) in __pthread_mutex_getprioceiling() argument 28 if (__builtin_expect ((atomic_load_relaxed (&(mutex->__data.__kind)) in __pthread_mutex_getprioceiling() 32 *prioceiling = (mutex->__data.__lock & PTHREAD_MUTEX_PRIO_CEILING_MASK) in __pthread_mutex_getprioceiling()
|
A D | pthread_cond_wait.c | 40 pthread_mutex_t *mutex; member 189 __pthread_mutex_cond_lock (cbuffer->mutex); in __condvar_cleanup_waiting() 386 LIBC_PROBE (cond_wait, 2, cond, mutex); in __pthread_cond_wait_common() 419 err = __pthread_mutex_unlock_usercnt (mutex, 0); in __pthread_cond_wait_common() 499 cbuffer.mutex = mutex; in __pthread_cond_wait_common() 607 err = __pthread_mutex_cond_lock (mutex); in __pthread_cond_wait_common() 615 ___pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) in ___pthread_cond_wait() argument 618 return __pthread_cond_wait_common (cond, mutex, 0, NULL); in ___pthread_cond_wait() 643 return __pthread_cond_wait_common (cond, mutex, clockid, abstime); in libc_hidden_ver() 658 return __pthread_cond_timedwait64 (cond, mutex, &ts64); [all …]
|
A D | DESIGN-systemtap-probes.txt | 26 arg1 = address of mutex lock 28 arg1 = address of mutex lock 30 arg1 = address of mutex lock 32 arg1 = address of mutex lock 34 arg1 = address of mutex lock, arg2 = address of timespec 36 arg1 = address of mutex lock, arg2 = clockid, 39 mutex lock 40 arg1 = address of mutex lock 42 arg1 = address of mutex lock 68 arg2 = mutex lock [all …]
|
A D | pthread_mutex_init.c | 51 ___pthread_mutex_init (pthread_mutex_t *mutex, in ___pthread_mutex_init() argument 89 memset (mutex, '\0', __SIZEOF_PTHREAD_MUTEX_T); in ___pthread_mutex_init() 125 mutex->__data.__lock = ceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT; in ___pthread_mutex_init() 140 atomic_store_relaxed (&(mutex->__data.__kind), mutex_kind); in ___pthread_mutex_init() 149 LIBC_PROBE (mutex_init, 1, mutex); in ___pthread_mutex_init()
|
A D | old_pthread_cond_wait.c | 27 __pthread_cond_wait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex) in __pthread_cond_wait_2_0() argument 42 return __pthread_cond_wait (cond->cond, mutex); in __pthread_cond_wait_2_0()
|
A D | old_pthread_cond_timedwait.c | 27 __pthread_cond_timedwait_2_0 (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex, in __pthread_cond_timedwait_2_0() argument 43 return __pthread_cond_timedwait (cond->cond, mutex, abstime); in __pthread_cond_timedwait_2_0()
|
A D | tst-robust-fork.c | 49 mutex_init (pthread_mutex_t *mutex, int bits) in mutex_init() argument 61 xpthread_mutex_init (mutex, &attr); in mutex_init()
|
A D | nptl-printers.py | 50 def __init__(self, mutex): argument 57 data = mutex['__data']
|
A D | Makefile | 348 tests-printers := test-mutexattr-printers test-mutex-printers \ 357 CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests) 363 CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
|