Check __PTHREAD_MUTEX_HAVE_PREV for mutex initializers
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 17:10:37 +0000 (10:10 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 17:10:37 +0000 (10:10 -0700)
nptl/ChangeLog
nptl/sysdeps/pthread/pthread.h

index 00d5e39..1f6bfed 100644 (file)
@@ -1,5 +1,13 @@
 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
+       __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
+       (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
+       (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
+       (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
+
+2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
        * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
        instead of __WORDSIZE.
 
index bd97e85..fcc0ce8 100644 (file)
@@ -83,7 +83,7 @@ enum
 
 
 /* Mutex initializers.  */
-#if __WORDSIZE == 64
+#ifdef __PTHREAD_MUTEX_HAVE_PREV
 # define PTHREAD_MUTEX_INITIALIZER \
   { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }
 # ifdef __USE_GNU