Lines Matching refs:rw
3 int __pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rw, const struct timespec *restrict at) in __pthread_rwlock_timedwrlock() argument
5 if (rw == NULL) { in __pthread_rwlock_timedwrlock()
8 int clock = (rw->_rw_clock == CLOCK_MONOTONIC) ? CLOCK_MONOTONIC : CLOCK_REALTIME; in __pthread_rwlock_timedwrlock()
11 r = pthread_rwlock_trywrlock(rw); in __pthread_rwlock_timedwrlock()
15 while (spins-- && rw->_rw_lock && !rw->_rw_waiters) a_spin(); in __pthread_rwlock_timedwrlock()
17 while ((r=__pthread_rwlock_trywrlock(rw))==EBUSY) { in __pthread_rwlock_timedwrlock()
18 if (!(r=rw->_rw_lock)) continue; in __pthread_rwlock_timedwrlock()
20 a_inc(&rw->_rw_waiters); in __pthread_rwlock_timedwrlock()
21 a_cas(&rw->_rw_lock, r, t); in __pthread_rwlock_timedwrlock()
22 r = __timedwait(&rw->_rw_lock, t, clock, at, rw->_rw_shared^128); in __pthread_rwlock_timedwrlock()
23 a_dec(&rw->_rw_waiters); in __pthread_rwlock_timedwrlock()