/glibc-2.36/nptl/ |
D | pthread_mutex_lock.c | 35 lll_mutex_lock_optimized (pthread_mutex_t *mutex) in lll_mutex_lock_optimized() argument 44 int private = PTHREAD_MUTEX_PSHARED (mutex); in lll_mutex_lock_optimized() 45 if (private == LLL_PRIVATE && SINGLE_THREAD_P && mutex->__data.__lock == 0) in lll_mutex_lock_optimized() 46 mutex->__data.__lock = 1; in lll_mutex_lock_optimized() 48 lll_lock (mutex->__data.__lock, private); in lll_mutex_lock_optimized() 51 # define LLL_MUTEX_LOCK(mutex) \ argument 52 lll_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)) 53 # define LLL_MUTEX_LOCK_OPTIMIZED(mutex) lll_mutex_lock_optimized (mutex) argument 54 # define LLL_MUTEX_TRYLOCK(mutex) \ argument 55 lll_trylock ((mutex)->__data.__lock) [all …]
|
D | pthread_mutex_unlock.c | 28 __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) 33 lll_mutex_unlock_optimized (pthread_mutex_t *mutex) in lll_mutex_unlock_optimized() argument 39 int private = PTHREAD_MUTEX_PSHARED (mutex); in lll_mutex_unlock_optimized() 41 mutex->__data.__lock = 0; in lll_mutex_unlock_optimized() 43 lll_unlock (mutex->__data.__lock, private); in lll_mutex_unlock_optimized() 47 __pthread_mutex_unlock_usercnt (pthread_mutex_t *mutex, int decr) in __pthread_mutex_unlock_usercnt() argument 51 int type = PTHREAD_MUTEX_TYPE_ELISION (mutex); in __pthread_mutex_unlock_usercnt() 55 return __pthread_mutex_unlock_full (mutex, decr); in __pthread_mutex_unlock_usercnt() 62 mutex->__data.__owner = 0; in __pthread_mutex_unlock_usercnt() 65 --mutex->__data.__nusers; in __pthread_mutex_unlock_usercnt() [all …]
|
D | pthread_mutex_timedlock.c | 32 __pthread_mutex_clocklock_common (pthread_mutex_t *mutex, in __pthread_mutex_clocklock_common() argument 45 switch (__builtin_expect (PTHREAD_MUTEX_TYPE_ELISION (mutex), in __pthread_mutex_clocklock_common() 52 if (mutex->__data.__owner == id) in __pthread_mutex_clocklock_common() 55 if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) in __pthread_mutex_clocklock_common() 59 ++mutex->__data.__count; in __pthread_mutex_clocklock_common() 65 result = __futex_clocklock64 (&mutex->__data.__lock, clockid, abstime, in __pthread_mutex_clocklock_common() 66 PTHREAD_MUTEX_PSHARED (mutex)); in __pthread_mutex_clocklock_common() 72 mutex->__data.__count = 1; in __pthread_mutex_clocklock_common() 78 if (__glibc_unlikely (mutex->__data.__owner == id)) in __pthread_mutex_clocklock_common() 85 FORCE_ELISION (mutex, goto elision); in __pthread_mutex_clocklock_common() [all …]
|
D | pthread_mutex_trylock.c | 26 ___pthread_mutex_trylock (pthread_mutex_t *mutex) in ___pthread_mutex_trylock() argument 33 switch (__builtin_expect (PTHREAD_MUTEX_TYPE_ELISION (mutex), in ___pthread_mutex_trylock() 40 if (mutex->__data.__owner == id) in ___pthread_mutex_trylock() 43 if (__glibc_unlikely (mutex->__data.__count + 1 == 0)) in ___pthread_mutex_trylock() 47 ++mutex->__data.__count; in ___pthread_mutex_trylock() 51 if (lll_trylock (mutex->__data.__lock) == 0) 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() 63 if (lll_trylock_elision (mutex->__data.__lock, in ___pthread_mutex_trylock() [all …]
|
D | test-mutex-printers.c | 30 static int test_status_destroyed (pthread_mutex_t *mutex); 31 static int test_status_no_robust (pthread_mutex_t *mutex, 33 static int test_status_robust (pthread_mutex_t *mutex, 35 static int test_locking_state_robust (pthread_mutex_t *mutex); 37 static int test_recursive_locks (pthread_mutex_t *mutex, 43 pthread_mutex_t mutex; in main() local 48 && test_status_destroyed (&mutex) == PASS in main() 49 && test_status_no_robust (&mutex, &attr) == PASS in main() 50 && test_status_robust (&mutex, &attr) == PASS in main() 51 && test_recursive_locks (&mutex, &attr) == PASS) in main() [all …]
|
D | test-mutexattr-printers.c | 36 #define SET_PRIOCEILING(mutex, prioceiling, old_ceiling) \ argument 37 pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling) 39 static int mutex_reinit (pthread_mutex_t *mutex, 41 static int test_settype (pthread_mutex_t *mutex, pthread_mutexattr_t *attr); 42 static int test_setrobust (pthread_mutex_t *mutex, pthread_mutexattr_t *attr); 43 static int test_setpshared (pthread_mutex_t *mutex, pthread_mutexattr_t *attr); 44 static int test_setprotocol (pthread_mutex_t *mutex, 50 pthread_mutex_t mutex; in main() local 55 && pthread_mutex_init (&mutex, NULL) == 0 in main() 56 && test_settype (&mutex, &attr) == PASS in main() [all …]
|
D | descr.h | 197 # define ENQUEUE_MUTEX_BOTH(mutex, val) \ argument 202 next->__prev = (void *) &mutex->__data.__list.__next; \ 203 mutex->__data.__list.__next = THREAD_GETMEM (THREAD_SELF, \ 205 mutex->__data.__list.__prev = (void *) &THREAD_SELF->robust_head; \ 209 (void *) (((uintptr_t) &mutex->__data.__list.__next) \ 212 # define DEQUEUE_MUTEX(mutex) \ argument 215 ((char *) (((uintptr_t) mutex->__data.__list.__next) & ~1ul) \ 217 next->__prev = mutex->__data.__list.__prev; \ 219 ((char *) (((uintptr_t) mutex->__data.__list.__prev) & ~1ul) \ 221 prev->__next = mutex->__data.__list.__next; \ [all …]
|
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
|
D | pthread_mutex_setprioceiling.c | 27 __pthread_mutex_setprioceiling (pthread_mutex_t *mutex, int prioceiling, in __pthread_mutex_setprioceiling() argument 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() 87 futex_wait ((unsigned int *) &mutex->__data.__lock, ceilval | 2, 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() [all …]
|
D | pthread_cond_wait.c | 40 pthread_mutex_t *mutex; member 189 __pthread_mutex_cond_lock (cbuffer->mutex); in __condvar_cleanup_waiting() 379 __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, in __pthread_cond_wait_common() argument 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() 630 ___pthread_cond_timedwait64 (pthread_cond_t *cond, pthread_mutex_t *mutex, in libc_hidden_ver() [all …]
|
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()
|
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 …]
|
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()
|
/glibc-2.36/htl/tests/ |
D | test-1.c | 33 pthread_mutex_t *mutex = arg; in foo() local 34 pthread_mutex_lock (mutex); in foo() 35 pthread_mutex_unlock (mutex); in foo() 36 return mutex; in foo() 45 pthread_mutex_t mutex[THREADS]; in main() local 49 pthread_mutex_init (&mutex[i], 0); in main() 50 pthread_mutex_lock (&mutex[i]); in main() 51 err = pthread_create (&tid[i], 0, foo, &mutex[i]); in main() 60 pthread_mutex_unlock (&mutex[i]); in main() 64 assert (ret == &mutex[i]); in main()
|
D | test-9.c | 58 pthread_mutex_t mutex; in main() local 68 err = pthread_mutex_init (&mutex, &mattr); in main() 76 pthread_mutex_lock (&mutex); in main() 77 pthread_mutex_lock (&mutex); in main() 78 pthread_mutex_unlock (&mutex); in main() 79 pthread_mutex_unlock (&mutex); in main() 83 err = pthread_create (&tid[i], 0, thr, &mutex); in main() 99 err = pthread_mutex_destroy (&mutex); in main()
|
/glibc-2.36/sysdeps/pthread/ |
D | tst-cnd-broadcast.c | 30 static mtx_t mutex; variable 40 mtx_lock (&mutex); in child_wait() 42 cnd_wait (&cond, &mutex); in child_wait() 43 mtx_unlock (&mutex); in child_wait() 58 if (mtx_init (&mutex, mtx_plain) != thrd_success) in do_test() 71 mtx_lock (&mutex); in do_test() 74 mtx_unlock (&mutex); in do_test() 80 mtx_lock (&mutex); in do_test() 83 mtx_unlock (&mutex); in do_test() 91 mtx_destroy (&mutex); in do_test()
|
D | tst-cond25.c | 38 pthread_mutex_t mutex; variable 46 int ret = pthread_mutex_trylock (&mutex); in cleanup() 52 if (pthread_mutex_unlock (&mutex)) in cleanup() 64 if ((ret = pthread_mutex_lock (&mutex)) != 0) in signaller() 76 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in signaller() 89 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in signaller() 103 if ((ret = pthread_mutex_lock (&mutex)) != 0) in waiter() 111 if ((ret = pthread_cond_wait (&cond, &mutex)) != 0) in waiter() 118 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in waiter() 132 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in waiter() [all …]
|
D | tst-cnd-basic.c | 29 static mtx_t mutex; variable 36 if (mtx_lock (&mutex) != thrd_success) in signal_parent() 40 if (mtx_unlock (&mutex) != thrd_success) in signal_parent() 53 if (mtx_init (&mutex, mtx_plain) != thrd_success) in do_test() 56 if (mtx_lock (&mutex) != thrd_success) in do_test() 63 if (cnd_wait (&cond, &mutex) != thrd_success) in do_test() 71 if (mtx_unlock (&mutex) != thrd_success) in do_test() 74 mtx_destroy (&mutex); in do_test()
|
D | tst-cnd-timedwait.c | 29 static mtx_t mutex; variable 36 if (mtx_lock (&mutex) != thrd_success) in signal_parent() 40 if (mtx_unlock (&mutex) != thrd_success) in signal_parent() 54 if (mtx_init (&mutex, mtx_plain) != thrd_success) in do_test() 56 if (mtx_lock (&mutex) != thrd_success) in do_test() 69 if (cnd_timedwait (&cond, &mutex, &w_time) != thrd_success) in do_test() 75 if (mtx_unlock (&mutex) != thrd_success) in do_test() 78 mtx_destroy (&mutex); in do_test()
|
D | tst-mtx-basic.c | 26 static mtx_t mutex; variable 34 if (mtx_lock (&mutex) != thrd_success) in child_add() 39 if (mtx_unlock (&mutex) != thrd_success) in child_add() 48 mtx_init (&mutex, mtx_plain); in do_test() 54 if (mtx_lock (&mutex) != thrd_success) in do_test() 59 if (mtx_unlock (&mutex) != thrd_success) in do_test() 68 mtx_destroy (&mutex); in do_test()
|
D | tst-cond24.c | 33 static pthread_mutex_t mutex; variable 51 rv = pthread_mutex_lock (&mutex); in thread_fun_timed() 64 rv = pthread_cond_timedwait (&cond, &mutex, &ts); in thread_fun_timed() 77 rv = pthread_mutex_unlock (&mutex); in thread_fun_timed() 102 rv = pthread_mutex_lock (&mutex); in thread_fun() 112 rv = pthread_cond_wait (&cond, &mutex); in thread_fun() 124 rv = pthread_mutex_unlock (&mutex); in thread_fun() 163 rv = pthread_mutex_init (&mutex, &mutex_attr); in do_test_wait() 190 rv = pthread_mutex_lock (&mutex); in do_test_wait() 208 rv = pthread_mutex_unlock (&mutex); in do_test_wait()
|
D | tst-mtx-trylock.c | 26 static mtx_t mutex; variable 41 if (mtx_unlock (&mutex) != thrd_success) in choose_action() 60 choose_action (mtx_trylock (&mutex), child_name); in child_add() 71 if (mtx_init (&mutex, mtx_timed) != thrd_success) in do_test() 77 choose_action (mtx_trylock (&mutex), parent_name); in do_test() 85 mtx_destroy (&mutex); in do_test()
|
/glibc-2.36/htl/ |
D | forward.c | 99 FORWARD (pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), 100 (cond, mutex), 0) 102 (pthread_cond_t *cond, pthread_mutex_t *mutex, 103 const struct timespec *abstime), (cond, mutex, abstime), 0) 123 FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0) 126 (pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr), 127 (mutex, mutexattr), 0) 129 FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0) 131 FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
|
/glibc-2.36/sysdeps/htl/ |
D | pt-cond-timedwait.c | 26 pthread_mutex_t *mutex, 32 pthread_mutex_t *mutex, in __pthread_cond_timedwait() argument 35 return __pthread_cond_timedwait_internal (cond, mutex, -1, abstime); in __pthread_cond_timedwait() 42 pthread_mutex_t *mutex, in __pthread_cond_clockwait() argument 46 return __pthread_cond_timedwait_internal (cond, mutex, clockid, abstime); in __pthread_cond_clockwait() 83 pthread_mutex_t *mutex, in __pthread_cond_timedwait_internal() argument 99 err = __pthread_mutex_checklocked (mutex); in __pthread_cond_timedwait_internal() 146 __pthread_mutex_unlock (mutex); in __pthread_cond_timedwait_internal() 207 __pthread_mutex_lock (mutex); in __pthread_cond_timedwait_internal()
|
/glibc-2.36/sysdeps/mach/hurd/htl/ |
D | pt-hurd-cond-timedwait.c | 27 pthread_mutex_t *mutex, 33 pthread_mutex_t *mutex, in __pthread_hurd_cond_timedwait_np() argument 36 return __pthread_hurd_cond_timedwait_internal (cond, mutex, abstime); in __pthread_hurd_cond_timedwait_np() 43 pthread_mutex_t *mutex, in __pthread_hurd_cond_timedwait_internal() argument 105 mutex = NULL; in __pthread_hurd_cond_timedwait_internal() 112 __pthread_mutex_unlock (mutex); in __pthread_hurd_cond_timedwait_internal() 168 if (mutex != NULL) in __pthread_hurd_cond_timedwait_internal() 170 __pthread_mutex_lock (mutex); in __pthread_hurd_cond_timedwait_internal()
|