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 prev


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;


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