diff options
Diffstat (limited to 'nptl/pthread_rwlock_timedrdlock.c')
-rw-r--r-- | nptl/pthread_rwlock_timedrdlock.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c index 654d628b2f..fcd10aac90 100644 --- a/nptl/pthread_rwlock_timedrdlock.c +++ b/nptl/pthread_rwlock_timedrdlock.c @@ -33,7 +33,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime) int result = 0; /* Make sure we are along. */ - lll_mutex_lock(rwlock->__data.__lock); + lll_lock(rwlock->__data.__lock, rwlock->__data.__shared); while (1) { @@ -110,16 +110,14 @@ pthread_rwlock_timedrdlock (rwlock, abstime) int waitval = rwlock->__data.__readers_wakeup; /* Free the lock. */ - lll_mutex_unlock (rwlock->__data.__lock); + lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); /* Wait for the writer to finish. */ err = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup, - waitval, &rt, - // XYZ check mutex flag - LLL_SHARED); + waitval, &rt, rwlock->__data.__shared); /* Get the lock. */ - lll_mutex_lock (rwlock->__data.__lock); + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); --rwlock->__data.__nr_readers_queued; @@ -133,7 +131,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime) } /* We are done, free the lock. */ - lll_mutex_unlock (rwlock->__data.__lock); + lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); return result; } |