summaryrefslogtreecommitdiff
path: root/src/thread/pthread_rwlock_rdlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_rwlock_rdlock.c')
-rw-r--r--src/thread/pthread_rwlock_rdlock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/thread/pthread_rwlock_rdlock.c b/src/thread/pthread_rwlock_rdlock.c
index 29863507..0800d21f 100644
--- a/src/thread/pthread_rwlock_rdlock.c
+++ b/src/thread/pthread_rwlock_rdlock.c
@@ -2,7 +2,5 @@
int pthread_rwlock_rdlock(pthread_rwlock_t *rw)
{
- while (pthread_rwlock_tryrdlock(rw))
- __wait(&rw->_rw_wrlock, &rw->_rw_waiters, 1, 0);
- return 0;
+ return pthread_rwlock_timedrdlock(rw, 0);
}