about summary refs log tree commit diff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-26 22:11:42 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-26 22:11:42 +0000
commit546346b6f849fea25265f48c5b9cf536ef1cf4ee (patch)
treea0aff9d7e8a3a7af2392412a5375d80d10584421 /nptl/pthreadP.h
parenta2dd3360dbbd183b289d356b0ebb3bafc921bb83 (diff)
downloadglibc-546346b6f849fea25265f48c5b9cf536ef1cf4ee.tar.gz
glibc-546346b6f849fea25265f48c5b9cf536ef1cf4ee.tar.xz
glibc-546346b6f849fea25265f48c5b9cf536ef1cf4ee.zip
* 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/pthreadP.h')
-rw-r--r--nptl/pthreadP.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 21ce6fe0b7..46e24761af 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -118,6 +118,11 @@ enum
    | PTHREAD_MUTEXATTR_PROTOCOL_MASK | PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
 
 
+/* Check whether rwlock prefers readers.   */
+#define PTHREAD_RWLOCK_PREFER_READER_P(rwlock) \
+  ((rwlock)->__data.__flags == 0)
+
+
 /* Bits used in robust mutex implementation.  */
 #define FUTEX_WAITERS		0x80000000
 #define FUTEX_OWNER_DIED	0x40000000