1 #include "pthread_impl.h"
3 int pthread_rwlock_timedrdlock(pthread_rwlock_t *rw, const struct timespec *at)
6 while (pthread_rwlock_tryrdlock(rw)) {
7 if (!w) a_inc(&rw->_rw_waiters), w++;
8 if (__timedwait(&rw->_rw_wrlock, 1, CLOCK_REALTIME, at, 0, 0, 0)==ETIMEDOUT) {
9 if (w) a_dec(&rw->_rw_waiters);
13 if (w) a_dec(&rw->_rw_waiters);