aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/pthread.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-14 16:48:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-14 16:48:59 -0700
commit245a11d7bd3bc44cd2b9f8598516287393705f76 (patch)
tree5a208753240c4a5c1bff445ec83c50d1232db316 /nptl/sysdeps/pthread/pthread.h
parent0b254d8f3db5deb23e57d5d644d7a9b2ca6df3f2 (diff)
downloadglibc-245a11d7bd3bc44cd2b9f8598516287393705f76.tar
glibc-245a11d7bd3bc44cd2b9f8598516287393705f76.tar.gz
glibc-245a11d7bd3bc44cd2b9f8598516287393705f76.tar.bz2
glibc-245a11d7bd3bc44cd2b9f8598516287393705f76.zip
Add __PTHREAD_RWLOCK_INT_FLAGS_SHARED
Diffstat (limited to 'nptl/sysdeps/pthread/pthread.h')
-rw-r--r--nptl/sysdeps/pthread/pthread.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index fcc0ce846b..88c7c257ae 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -118,11 +118,20 @@ enum
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
};
+/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
+ has the shared field. All 64-bit architectures have the shared field
+ in pthread_rwlock_t. */
+#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
+# if __WORDSIZE == 64
+# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
+# endif
+#endif
+
/* Read-write lock initializers. */
# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
# ifdef __USE_GNU
-# if __WORDSIZE == 64
+# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }