diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-09-12 16:26:54 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-09-12 16:26:54 +0000 |
commit | 83584a7af898dd93c48600fe850d150c51b10899 (patch) | |
tree | 0affa8ffee374ab83e40501d8d8967a03569c44d /libc/nptl/pthread_rwlock_timedwrlock.c | |
parent | 04b4d23592609edcd19fd5a461bbe6d3cc677b5b (diff) |
Merge changes between r2424 and r3467 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@3468 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl/pthread_rwlock_timedwrlock.c')
-rw-r--r-- | libc/nptl/pthread_rwlock_timedwrlock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/nptl/pthread_rwlock_timedwrlock.c b/libc/nptl/pthread_rwlock_timedwrlock.c index 97c0598f9..e6283f462 100644 --- a/libc/nptl/pthread_rwlock_timedwrlock.c +++ b/libc/nptl/pthread_rwlock_timedwrlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -33,7 +33,7 @@ pthread_rwlock_timedwrlock (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) { @@ -100,14 +100,14 @@ pthread_rwlock_timedwrlock (rwlock, abstime) 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. */ err = lll_futex_timed_wait (&rwlock->__data.__writer_wakeup, - waitval, &rt); + waitval, &rt, 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; @@ -121,7 +121,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime) } /* We are done, free the lock. */ - lll_mutex_unlock (rwlock->__data.__lock); + lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared); return result; } |