/nptl/ |
A D | tst-rwlock2.c | 26 pthread_rwlock_t r; in do_test() local 48 if (pthread_rwlock_init (&r, &at) != 0) in do_test() 62 if (pthread_rwlock_wrlock (&r) != 0) in do_test() 69 e = pthread_rwlock_tryrdlock (&r); in do_test() 82 e = pthread_rwlock_trywrlock (&r); in do_test() 95 if (pthread_rwlock_unlock (&r) != 0) in do_test() 109 e = pthread_rwlock_trywrlock (&r); in do_test() 122 if (pthread_rwlock_unlock (&r) != 0) in do_test() 136 e = pthread_rwlock_tryrdlock (&r); in do_test() 149 if (pthread_rwlock_unlock (&r) != 0) in do_test() [all …]
|
A D | tst-rwlock3.c | 30 pthread_rwlock_t r; in do_test() local 33 if (pthread_rwlock_init (&r, NULL) != 0) in do_test() 40 if (pthread_rwlock_trywrlock (&r) != 0) in do_test() 47 e = pthread_rwlock_rdlock (&r); in do_test() 60 e = pthread_rwlock_wrlock (&r); in do_test() 73 if (pthread_rwlock_unlock (&r) != 0) in do_test() 80 if (pthread_rwlock_destroy (&r) != 0) in do_test()
|
A D | pthread_rwlock_common.c | 255 &r, rnew)) in __pthread_rwlock_rdunlock() 284 unsigned int r; in __pthread_rwlock_rdlock_full64() local 322 (&rwlock->__data.__readers, &r, r | PTHREAD_RWLOCK_RWAITING)) in __pthread_rwlock_rdlock_full64() 377 &r, r - (1 << PTHREAD_RWLOCK_READER_SHIFT))) in __pthread_rwlock_rdlock_full64() 403 r ^ PTHREAD_RWLOCK_WRPHASE)) in __pthread_rwlock_rdlock_full64() 562 (&rwlock->__data.__readers, &r, in __pthread_rwlock_wrunlock() 563 ((r ^ PTHREAD_RWLOCK_WRLOCKED) in __pthread_rwlock_wrunlock() 647 (&rwlock->__data.__readers, &r, r | PTHREAD_RWLOCK_WRLOCKED)) in __pthread_rwlock_wrlock_full64() 771 r |= PTHREAD_RWLOCK_WRLOCKED; in __pthread_rwlock_wrlock_full64() 796 &r, r | PTHREAD_RWLOCK_WRPHASE)) in __pthread_rwlock_wrlock_full64() [all …]
|
A D | pthread_rwlock_tryrdlock.c | 39 unsigned int r = atomic_load_relaxed (&rwlock->__data.__readers); in ___pthread_rwlock_tryrdlock() local 43 if ((r & PTHREAD_RWLOCK_WRPHASE) == 0) in ___pthread_rwlock_tryrdlock() 48 if (((r & PTHREAD_RWLOCK_WRLOCKED) != 0) in ___pthread_rwlock_tryrdlock() 52 rnew = r + (1 << PTHREAD_RWLOCK_READER_SHIFT); in ___pthread_rwlock_tryrdlock() 58 if ((r & PTHREAD_RWLOCK_WRLOCKED) != 0) in ___pthread_rwlock_tryrdlock() 64 rnew = (r + (1 << PTHREAD_RWLOCK_READER_SHIFT)) in ___pthread_rwlock_tryrdlock() 89 &r, rnew)); in ___pthread_rwlock_tryrdlock() 91 if ((r & PTHREAD_RWLOCK_WRPHASE) != 0) in ___pthread_rwlock_tryrdlock()
|
A D | pthread_rwlock_trywrlock.c | 37 unsigned int r = atomic_load_relaxed (&rwlock->__data.__readers); in ___pthread_rwlock_trywrlock() local 40 while (((r & PTHREAD_RWLOCK_WRLOCKED) == 0) in ___pthread_rwlock_trywrlock() 41 && (((r >> PTHREAD_RWLOCK_READER_SHIFT) == 0) in ___pthread_rwlock_trywrlock() 42 || (prefer_writer && ((r & PTHREAD_RWLOCK_WRPHASE) != 0)))) in ___pthread_rwlock_trywrlock() 46 &rwlock->__data.__readers, &r, in ___pthread_rwlock_trywrlock() 47 r | PTHREAD_RWLOCK_WRPHASE | PTHREAD_RWLOCK_WRLOCKED)) in ___pthread_rwlock_trywrlock() 56 if ((r & PTHREAD_RWLOCK_WRPHASE) == 0) in ___pthread_rwlock_trywrlock()
|
A D | tst-mutexpi10.c | 43 int r; in do_test() member 51 for (int r = 0; r < array_length (robust); r++) in do_test() local 58 xpthread_mutexattr_setrobust (&attr, robust[r]); in do_test() 68 clocks[c].r); in do_test() 69 if (clocks[c].r == 0) in do_test()
|
A D | tst-rwlock15.c | 29 static pthread_rwlock_t r = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP; variable 41 int e = pthread_rwlock_timedwrlock (&r, &ts); in writer() 58 while ((e = pthread_rwlock_tryrdlock (&r)) != EBUSY) in reader() 62 pthread_rwlock_unlock (&r); in reader() 64 e = pthread_rwlock_rdlock (&r); in reader() 70 pthread_rwlock_unlock (&r); in reader() 81 if (pthread_rwlock_rdlock (&r) != 0) in do_test()
|
A D | tst-cancel17.c | 43 int r = pthread_barrier_wait (&b); in tf() local 44 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf() 67 int r = pthread_barrier_wait (&b); in tf2() local 68 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf2() 125 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in do_test() 173 r = pthread_barrier_wait (&b); in do_test() 174 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in do_test() 260 r = pthread_barrier_wait (&b); in do_test() 261 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in do_test() 304 r = pthread_barrier_wait (&b); in do_test() [all …]
|
A D | tst-rwlock6.c | 54 pthread_rwlock_t *r = args->rwlock; in tf() local 72 TEST_COMPARE (pthread_rwlock_clockrdlock (r, clockid, &ts_timeout), in tf() 85 TEST_COMPARE (pthread_rwlock_timedrdlock (r, &ts_timeout), EINVAL); in tf() 103 pthread_rwlock_t r; in do_test_clock() local 112 if (pthread_rwlock_init (&r, &a) != 0) in do_test_clock() 124 ? pthread_rwlock_timedwrlock (&r, &ts) in do_test_clock() 125 : pthread_rwlock_clockwrlock (&r, clockid, &ts); in do_test_clock() 135 TEST_COMPARE (pthread_rwlock_timedrdlock (&r, &ts), EDEADLK); in do_test_clock() 144 TEST_COMPARE (pthread_rwlock_timedwrlock (&r, &ts), EDEADLK); in do_test_clock() 151 args.rwlock = &r; in do_test_clock() [all …]
|
A D | tst-rwlock7.c | 53 pthread_rwlock_t *r = args->rwlock; in tf() local 66 TEST_COMPARE (pthread_rwlock_timedwrlock (r, &ts_timeout), ETIMEDOUT); in tf() 68 TEST_COMPARE (pthread_rwlock_clockwrlock (r, clockid, &ts_timeout), in tf() 81 TEST_COMPARE (pthread_rwlock_timedwrlock (r, &ts_invalid), EINVAL); in tf() 83 TEST_COMPARE (pthread_rwlock_clockwrlock (r, clockid, &ts_invalid), EINVAL); in tf() 99 pthread_rwlock_t r; in do_test_clock() local 108 if (pthread_rwlock_init (&r, &a) != 0) in do_test_clock() 121 if (pthread_rwlock_timedrdlock (&r, &ts) != 0) in do_test_clock() 124 if (pthread_rwlock_clockrdlock (&r, clockid, &ts) != 0) in do_test_clock() 131 args.rwlock = &r; in do_test_clock() [all …]
|
A D | tst-cancel4_1.c | 70 int r = pthread_barrier_wait (&b2); in tf_sendmmsg() local 71 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf_sendmmsg() 74 r = pthread_barrier_wait (&b2); in tf_sendmmsg() 75 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf_sendmmsg()
|
A D | tst-cancel4_2.c | 66 int r = pthread_barrier_wait (&b2); in tf_recvmmsg() local 67 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf_recvmmsg() 72 r = pthread_barrier_wait (&b2); in tf_recvmmsg() 73 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in tf_recvmmsg()
|
A D | tst-cleanup4.c | 59 int r = pthread_barrier_wait (&b2); in fn_read() local 60 if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) in fn_read() 177 void *r; in do_test() local 178 if ((e = pthread_join (th, &r)) != 0) in do_test() 184 if (r != PTHREAD_CANCELED) in do_test()
|
A D | tst-sem11.c | 61 void *r; in main() local 62 if (pthread_join (th, &r) != 0) in main() 67 if (r != PTHREAD_CANCELED && --tries > 0) in main()
|
A D | pthread_cond_common.c | 256 unsigned r = atomic_fetch_or_release (cond->__data.__g_refs + g1, 0); in __condvar_quiesce_and_switch_g1() local 257 while ((r >> 1) > 0) in __condvar_quiesce_and_switch_g1() 259 for (unsigned int spin = maxspin; ((r >> 1) > 0) && (spin > 0); spin--) in __condvar_quiesce_and_switch_g1() 262 r = atomic_load_relaxed (cond->__data.__g_refs + g1); in __condvar_quiesce_and_switch_g1() 264 if ((r >> 1) > 0) in __condvar_quiesce_and_switch_g1() 273 r = atomic_fetch_or_relaxed (cond->__data.__g_refs + g1, 1) | 1; in __condvar_quiesce_and_switch_g1() 275 if ((r >> 1) > 0) in __condvar_quiesce_and_switch_g1() 276 futex_wait_simple (cond->__data.__g_refs + g1, r, private); in __condvar_quiesce_and_switch_g1() 279 r = atomic_load_relaxed (cond->__data.__g_refs + g1); in __condvar_quiesce_and_switch_g1()
|
A D | test-rwlock-printers.py | 40 test_printer(var, to_string, {'Status': r'Acquired \(Read\)', 'Readers': '1'}) 51 test_printer(var, to_string, {'Status': r'Acquired \(Write\)',
|
A D | tst-tls3.c | 148 int r; in do_test() local 149 for (r = 0; r < 10; ++r) in do_test()
|
A D | tst-mutex8.c | 262 void *r; in check_type() local 263 if (pthread_join (th, &r) != 0) in check_type() 268 if (r != NULL) in check_type() 337 if (pthread_join (th, &r) != 0) in check_type() 342 if (r != PTHREAD_CANCELED) in check_type()
|
A D | test-mutex-printers.py | 49 'Owner ID': r'({0}|Unknown)'.format(thread_id)}) 75 test_printer(var, to_string, {'Owner ID': r'{0} \(dead\)'.format(child_id)})
|
A D | nptl-printers.py | 484 r = self.readers >> PTHREAD_RWLOCK_READER_SHIFT 485 if r > 0: 487 self.values.append(('Readers', r)) 577 printer.add_printer('pthread_mutex_t', r'^pthread_mutex_t$', 579 printer.add_printer('pthread_mutexattr_t', r'^pthread_mutexattr_t$', 581 printer.add_printer('pthread_cond_t', r'^pthread_cond_t$', 583 printer.add_printer('pthread_condattr_t', r'^pthread_condattr_t$', 585 printer.add_printer('pthread_rwlock_t', r'^pthread_rwlock_t$', 587 printer.add_printer('pthread_rwlockattr_t', r'^pthread_rwlockattr_t$',
|
A D | tst-cancel7.c | 123 void *r = xpthread_join (th); in do_test() local 152 return r != PTHREAD_CANCELED; in do_test()
|
A D | tst-signal3.c | 174 unsigned int r = 42; in do_test() local 185 int s = rand_r (&r) % N; in do_test()
|