diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-01-06 21:40:51 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-01-06 21:40:51 +0000 |
commit | d804f5df602e6a348edcf7d2a2fe73b185bfbd34 (patch) | |
tree | 8f407c4ace97efa8c02c5c079d04f20e49cc1831 /nptl | |
parent | 74158740ea6bf9acbb63fa7744e56a0aacc5ca9e (diff) | |
download | glibc-d804f5df602e6a348edcf7d2a2fe73b185bfbd34.tar.gz glibc-d804f5df602e6a348edcf7d2a2fe73b185bfbd34.tar.xz glibc-d804f5df602e6a348edcf7d2a2fe73b185bfbd34.zip |
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
Don't give the union a name because it changes the mangled name. Instead name the struct for __data. * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. * pthread_create.c (start_thread): Adjust robust mutex free loop. * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 12 | ||||
-rw-r--r-- | nptl/pthread_create.c | 26 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h | 8 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h | 10 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h | 12 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h | 12 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h | 12 |
7 files changed, 52 insertions, 40 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 0d00473d8c..520e4441af 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,15 @@ +2006-01-06 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t): + Don't give the union a name because it changes the mangled name. + Instead name the struct for __data. + * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. + * pthread_create.c (start_thread): Adjust robust mutex free loop. + * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust. + 2006-01-05 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait): diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 2dbe58dcd4..94d424b1f2 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -311,25 +311,25 @@ start_thread (void *arg) atomic_bit_set (&pd->cancelhandling, EXITING_BIT); /* If this thread has any robust mutexes locked, handle them now. */ - pthread_mutex_t *robust = THREAD_GETMEM (pd, robust_list); + struct __pthread_mutex_s *robust = THREAD_GETMEM (pd, robust_list); if (__builtin_expect (robust != NULL, 0)) { do { - pthread_mutex_t *this = robust; - robust = robust->__data.__next; - - assert (lll_mutex_islocked (this->__data.__lock)); - this->__data.__count = 0; - --this->__data.__nusers; - assert (this->__data.__owner != PTHREAD_MUTEX_NOTRECOVERABLE); - this->__data.__owner = PTHREAD_MUTEX_OWNERDEAD; - this->__data.__next = NULL; + struct __pthread_mutex_s *this = robust; + robust = robust->__next; + + assert (lll_mutex_islocked (this->__lock)); + this->__count = 0; + --this->__nusers; + assert (this->__owner != PTHREAD_MUTEX_NOTRECOVERABLE); + this->__owner = PTHREAD_MUTEX_OWNERDEAD; + this->__next = NULL; #ifdef __PTHREAD_MUTEX_HAVE_PREV - this->__data.__prev = NULL; + this->__prev = NULL; #endif - lll_mutex_unlock (this->__data.__lock); + lll_mutex_unlock (this->__lock); } while (robust != NULL); diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index 3bd1019995..2341a9c650 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -45,9 +45,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -59,7 +59,7 @@ typedef union __pthread_mutex_u union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h index a932101743..a13bb080a4 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -45,9 +45,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -57,8 +57,8 @@ typedef union __pthread_mutex_u binary compatibility. */ int __kind; int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; #define __PTHREAD_MUTEX_HAVE_PREV 1 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index c6f345221b..56ffef3d0b 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. PowerPC version. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -60,9 +60,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -75,15 +75,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index 63f7f01fa1..a2ad05dd54 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. @@ -59,9 +59,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -74,15 +74,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h index 3eb33a8646..ba940b35e0 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -59,9 +59,9 @@ typedef union /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ -typedef union __pthread_mutex_u +typedef union { - struct + struct __pthread_mutex_s { int __lock; unsigned int __count; @@ -74,15 +74,15 @@ typedef union __pthread_mutex_u int __kind; #if __WORDSIZE == 64 int __spins; - union __pthread_mutex_u *__next; - union __pthread_mutex_u *__prev; + struct __pthread_mutex_s *__next; + struct __pthread_mutex_s *__prev; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else unsigned int __nusers; union { int __spins; - union __pthread_mutex_u *__next; + struct __pthread_mutex_s *__next; }; #endif } __data; |