diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-26 22:11:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-26 22:11:42 +0000 |
commit | 546346b6f849fea25265f48c5b9cf536ef1cf4ee (patch) | |
tree | a0aff9d7e8a3a7af2392412a5375d80d10584421 /nptl/pthread_rwlock_timedrdlock.c | |
parent | a2dd3360dbbd183b289d356b0ebb3bafc921bb83 (diff) | |
download | glibc-546346b6f849fea25265f48c5b9cf536ef1cf4ee.tar.gz |
* pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
* pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
* pthread_rwlock_timedrdlock.c: Likewise.
* pthread_rwlock_tryrdlock.c: Likewise.
Diffstat (limited to 'nptl/pthread_rwlock_timedrdlock.c')
-rw-r--r-- | nptl/pthread_rwlock_timedrdlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c index 80ea83a3dd..caff5894fe 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) |