This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Check __PTHREAD_MUTEX_HAVE_PREV for mutex initializers


Hi,

This patch checks __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE
for mutex with prev.  Tested on Linux/x86-64/x32/ia32.  OK to install?

Thanks.

H.J.
	* 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.

diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index bd97e85..8f10c87 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]