summaryrefslogtreecommitdiff
path: root/fixincludes/tests/base
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-03 05:52:05 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-03 05:52:05 +0000
commitd0f017a14270a48eb1d3f06a771ab7b885e8cff3 (patch)
tree00c426b2364c9235ae1659b9df36e06c02cd0647 /fixincludes/tests/base
parent58a123f271071d01cba925a44d72f5953cb841ae (diff)
downloadgcc-d0f017a14270a48eb1d3f06a771ab7b885e8cff3.tar.gz
* inclhack.def (glibc_mutex_init): Also fix
PTHREAD_MUTEX_(RECURSIVE|ERRORCHECK|ADAPTIVE)_NP and PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP initializers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/tests/base')
-rw-r--r--fixincludes/tests/base/pthread.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index b1c4d517bce..e75a6ee0e33 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -59,6 +59,23 @@
#if defined( GLIBC_MUTEX_INIT_CHECK )
#define PTHREAD_MUTEX_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0 } }
+#ifdef __USE_GNU
+# if __WORDSIZE == 64
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0 } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0 } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0 } }
+# else
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0 } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, 0 } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, 0 } }
+# endif
+#endif
# if __WORDSIZE == 64
# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
@@ -66,6 +83,16 @@
# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0 } }
# endif
+# ifdef __USE_GNU
+# if __WORDSIZE == 64
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+# else
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 0 } }
+# endif
+# endif
#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }
#endif /* GLIBC_MUTEX_INIT_CHECK */