about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/pthread/pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/pthread/pthread.h')
-rw-r--r--linuxthreads/sysdeps/pthread/pthread.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h
index f2a742e57e..45be6cf2b8 100644
--- a/linuxthreads/sysdeps/pthread/pthread.h
+++ b/linuxthreads/sysdeps/pthread/pthread.h
@@ -23,6 +23,7 @@
 #define __need_sigset_t
 #include <signal.h>
 #include <bits/pthreadtypes.h>
+#include <bits/initspin.h>
 
 
 __BEGIN_DECLS
@@ -30,26 +31,26 @@ __BEGIN_DECLS
 /* Initializers.  */
 
 #define PTHREAD_MUTEX_INITIALIZER \
-  {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, {0, 0}}
+  {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, LOCK_INITIALIZER}
 #ifdef __USE_GNU
 # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
-  {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, {0, 0}}
+  {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, LOCK_INITIALIZER}
 # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
-  {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, {0, 0}}
+  {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, LOCK_INITIALIZER}
 # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
-  {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, {0, 0}}
+  {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, LOCK_INITIALIZER}
 #endif
 
-#define PTHREAD_COND_INITIALIZER {{0, 0}, 0}
+#define PTHREAD_COND_INITIALIZER {LOCK_INITIALIZER, 0}
 
 #ifdef __USE_UNIX98
 # define PTHREAD_RWLOCK_INITIALIZER \
-  { {0, 0}, 0, NULL, NULL, NULL,					      \
+  { LOCK_INITIALIZER, 0, NULL, NULL, NULL,					      \
     PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE }
 #endif
 #ifdef __USE_GNU
 # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-  { {0, 0}, 0, NULL, NULL, NULL,					      \
+  { LOCK_INITIALIZER, 0, NULL, NULL, NULL,					      \
     PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_PROCESS_PRIVATE }
 #endif