From e08057b1ff24258dd7460ad81e84491f7a28b424 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 1 Aug 2007 17:16:42 +0000 Subject: Updated to fedora-glibc-20070801T1703 --- nptl/pthread_rwlock_wrlock.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'nptl/pthread_rwlock_wrlock.c') diff --git a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c index 134b3e95d0..64fe970125 100644 --- a/nptl/pthread_rwlock_wrlock.c +++ b/nptl/pthread_rwlock_wrlock.c @@ -32,7 +32,7 @@ __pthread_rwlock_wrlock (rwlock) int result = 0; /* Make sure we are along. */ - lll_mutex_lock (rwlock->__data.__lock); + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); while (1) { @@ -65,22 +65,21 @@ __pthread_rwlock_wrlock (rwlock) int waitval = rwlock->__data.__writer_wakeup; /* Free the lock. */ - lll_mutex_unlock (rwlock->__data.__lock); + lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); /* Wait for the writer or reader(s) to finish. */ lll_futex_wait (&rwlock->__data.__writer_wakeup, waitval, - // XYZ check mutex flag - LLL_SHARED); + rwlock->__data.__shared); /* Get the lock. */ - lll_mutex_lock (rwlock->__data.__lock); + lll_lock (rwlock->__data.__lock, rwlock->__data.__shared); /* To start over again, remove the thread from the writer list. */ --rwlock->__data.__nr_writers_queued; } /* We are done, free the lock. */ - lll_mutex_unlock (rwlock->__data.__lock); + lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); return result; } -- cgit v1.2.3