PATCH: Check __PTHREAD_MUTEX_HAVE_PREV for mutex prev
H.J. Lu
hongjiu.lu@intel.com
Fri May 11 14:27:00 GMT 2012
Hi,
This patch adds x32 thread types support. Since x32 has the same thread
implementation as x86-64, checking __WORDSIZE for mutex prev support
isn't appropriate. We should check __PTHREAD_MUTEX_HAVE_PREV instead.
Tested on Linux/x32, Linux/ia32 and Linux/x86-64. OK to install?
Thanks.
H.J.
---
* pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
instead of __WORDSIZE.
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 0914885..3c1e479 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -355,7 +355,7 @@ start_thread (void *arg)
#ifndef __ASSUME_SET_ROBUST_LIST
/* If this thread has any robust mutexes locked, handle them now. */
-# if __WORDSIZE == 64
+# ifdef __PTHREAD_MUTEX_HAVE_PREV
void *robust = pd->robust_head.list;
# else
__pthread_slist_t *robust = pd->robust_list.__next;
More information about the Libc-alpha
mailing list