]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 00d5e39478553b815f2335f17cdd97a6c39d1ea1..1f6bfed19b18f867fee917586fb2c8a1ccd94a7d 100644 (file)
@@ -1,3 +1,11 @@
+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
index bd97e8556f63ef7b1e6acb517899c782ae8a68b1..fcc0ce846b2a710c5b3ba3be2f03610c286926aa 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