Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 25 of 40) sorted by relevance

12

/sysdeps/pthread/
A Dtst-cnd-broadcast.c30 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()
A Dtst-cnd-basic.c29 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()
A Dtst-mtx-basic.c26 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()
A Dtst-mtx-recursive.c28 static mtx_t mutex; in do_test() local
30 if (mtx_init (&mutex, mtx_plain | mtx_recursive) != thrd_success) in do_test()
33 if (mtx_lock (&mutex) != thrd_success) in do_test()
37 if (mtx_lock (&mutex) != thrd_success) in do_test()
40 mtx_destroy (&mutex); in do_test()
A Dtst-cnd-timedwait.c29 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()
A Dtst-mutex-errorcheck.c29 pthread_mutex_t mutex; in do_test() local
37 TEST_COMPARE (pthread_mutex_init (&mutex, &mutexattr), 0); in do_test()
44 TEST_COMPARE (pthread_mutex_timedlock (&mutex, &tms), 0); in do_test()
45 TEST_COMPARE (pthread_mutex_timedlock (&mutex, &tms), EDEADLK); in do_test()
47 TEST_COMPARE (pthread_mutex_unlock (&mutex), 0); in do_test()
A Dtst-mtx-trylock.c26 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()
A Dtst-robust10.c25 pthread_mutex_t mutex; variable
33 int ret = pthread_mutex_timedlock (&mutex, &abstime); in thr()
64 if (pthread_mutex_init (&mutex, &ma)) in do_test()
76 if (pthread_mutex_lock (&mutex)) in do_test()
94 if (pthread_mutex_unlock (&mutex)) in do_test()
100 if (pthread_mutex_destroy (&mutex)) in do_test()
A Dtst-mtx-timedlock.c26 static mtx_t mutex; variable
44 if (mtx_unlock (&mutex) != thrd_success) in choose_action()
63 choose_action (mtx_timedlock (&mutex, &wait_time), child_name); in child_add()
73 if (mtx_init (&mutex, mtx_timed) != thrd_success) in do_test()
90 choose_action (mtx_timedlock (&mutex, &wait_time), parent_name); in do_test()
98 mtx_destroy (&mutex); in do_test()
A Dtst-cond25.c38 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()
118 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in waiter()
132 if ((ret = pthread_mutex_unlock (&mutex)) != 0) in waiter()
156 if ((ret = pthread_mutex_lock (&mutex)) != 0) in timed_waiter()
[all …]
A Dtst-mutex10.c28 static pthread_mutex_t mutex; variable
40 xpthread_mutex_destroy (&mutex); in thr_func()
41 xpthread_mutex_init (&mutex, NULL); in thr_func()
55 xpthread_mutex_lock (&mutex); in thr_func()
56 xpthread_mutex_unlock (&mutex); in thr_func()
72 xpthread_mutex_init (&mutex, NULL); in do_test()
A Dtst-cond24.c33 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()
A Dtst-cond-except.c25 pthread_mutex_t mutex; variable
57 ret = pthread_mutex_init (&mutex, &mutexAttr); in thr()
65 pthread_cleanup_push (clean, (void *) &mutex); in thr()
66 ret = pthread_mutex_lock (&mutex); in thr()
70 ret = pthread_cond_wait (&cond, &mutex); in thr()
A Dmtx_timedlock.c22 mtx_timedlock (mtx_t *restrict mutex, in mtx_timedlock() argument
25 int err_code = __pthread_mutex_timedlock ((pthread_mutex_t *)mutex, in mtx_timedlock()
A Dcnd_timedwait.c22 cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex, in cnd_timedwait() argument
26 (pthread_mutex_t *) mutex, in cnd_timedwait()
A Dmtx_destroy.c24 __mtx_destroy (mtx_t *mutex) in __mtx_destroy() argument
26 __pthread_mutex_destroy ((pthread_mutex_t *) mutex); in __mtx_destroy()
A Dmtx_lock.c23 __mtx_lock (mtx_t *mutex) in __mtx_lock() argument
25 int err_code = __pthread_mutex_lock ((pthread_mutex_t *) mutex); in __mtx_lock()
A Dmtx_trylock.c23 __mtx_trylock (mtx_t *mutex) in __mtx_trylock() argument
25 int err_code = __pthread_mutex_trylock ((pthread_mutex_t *) mutex); in __mtx_trylock()
A Dmtx_unlock.c23 __mtx_unlock (mtx_t *mutex) in __mtx_unlock() argument
25 int err_code = __pthread_mutex_unlock ((pthread_mutex_t *) mutex); in __mtx_unlock()
/sysdeps/unix/sysv/linux/
A Dmtx_timedlock.c24 __mtx_timedlock64 (mtx_t *restrict mutex, in __mtx_timedlock64() argument
27 int err_code = __pthread_mutex_timedlock64 ((pthread_mutex_t *)mutex, in __mtx_timedlock64()
38 ___mtx_timedlock (mtx_t *restrict mutex,
43 return __mtx_timedlock64 (mutex, &ts64);
A Dcnd_timedwait.c24 __cnd_timedwait64 (cnd_t *restrict cond, mtx_t *restrict mutex, in __cnd_timedwait64() argument
28 (pthread_mutex_t *) mutex, in __cnd_timedwait64()
39 ___cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
44 return __cnd_timedwait64(cond, mutex, &ts64);
/sysdeps/htl/
A Dpt-cond-wait.c25 pthread_mutex_t *mutex,
34 __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) in __pthread_cond_wait() argument
36 return __pthread_cond_timedwait_internal (cond, mutex, -1, 0); in __pthread_cond_wait()
A Dpt-cond-timedwait.c26 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()
/sysdeps/mach/hurd/htl/
A Dpt-hurd-cond-wait.c27 pthread_mutex_t *mutex,
32 __pthread_hurd_cond_wait_np (pthread_cond_t *cond, pthread_mutex_t *mutex) in __pthread_hurd_cond_wait_np() argument
36 err = __pthread_hurd_cond_timedwait_internal (cond, mutex, NULL); in __pthread_hurd_cond_wait_np()
A Dpt-hurd-cond-timedwait.c27 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()

Completed in 15 milliseconds

12