From 546346b6f849fea25265f48c5b9cf536ef1cf4ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 26 May 2007 22:11:42 +0000 Subject: * 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. --- nptl/pthread_rwlock_tryrdlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nptl/pthread_rwlock_tryrdlock.c') diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c index 446af05969..df8863bcf8 100644 --- a/nptl/pthread_rwlock_tryrdlock.c +++ b/nptl/pthread_rwlock_tryrdlock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -32,7 +32,7 @@ __pthread_rwlock_tryrdlock (rwlock) if (rwlock->__data.__writer == 0 && (rwlock->__data.__nr_writers_queued == 0 - || rwlock->__data.__flags == 0)) + || PTHREAD_RWLOCK_PREFER_READER_P (rwlock))) { if (__builtin_expect (++rwlock->__data.__nr_readers == 0, 0)) { -- cgit v1.2.3