diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
commit | 8833066b122427710a9e14a888ce6cfa862332d3 (patch) | |
tree | 29591019d695919417b3698618d6a342e97381d6 /nptl/pthread_rwlock_timedrdlock.c | |
parent | fedca46896bdb702cb988837a0c2c5447e72ba2b (diff) | |
download | glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.gz glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.xz glibc-8833066b122427710a9e14a888ce6cfa862332d3.zip |
Updated to fedora-glibc-20070731T1624 cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'nptl/pthread_rwlock_timedrdlock.c')
-rw-r--r-- | nptl/pthread_rwlock_timedrdlock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c index 80ea83a3dd..654d628b2f 100644 --- a/nptl/pthread_rwlock_timedrdlock.c +++ b/nptl/pthread_rwlock_timedrdlock.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. @@ -43,7 +43,7 @@ pthread_rwlock_timedrdlock (rwlock, abstime) if (rwlock->__data.__writer == 0 /* ...and if either no writer is waiting or we prefer readers. */ && (!rwlock->__data.__nr_writers_queued - || rwlock->__data.__flags == 0)) + || PTHREAD_RWLOCK_PREFER_READER_P (rwlock))) { /* Increment the reader counter. Avoid overflow. */ if (++rwlock->__data.__nr_readers == 0) @@ -114,7 +114,9 @@ pthread_rwlock_timedrdlock (rwlock, abstime) /* Wait for the writer to finish. */ err = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup, - waitval, &rt); + waitval, &rt, + // XYZ check mutex flag + LLL_SHARED); /* Get the lock. */ lll_mutex_lock (rwlock->__data.__lock); |