Browse Source

* 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.
cvs/glibc-2_5-branch
Ulrich Drepper 21 years ago
parent
commit
d804f5df60
  1. 12
      nptl/ChangeLog
  2. 26
      nptl/pthread_create.c
  3. 8
      nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
  4. 10
      nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
  5. 12
      nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
  6. 12
      nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
  7. 12
      nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h

12
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> 2006-01-05 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait): * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):

26
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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -311,25 +311,25 @@ start_thread (void *arg)
atomic_bit_set (&pd->cancelhandling, EXITING_BIT); atomic_bit_set (&pd->cancelhandling, EXITING_BIT);
/* If this thread has any robust mutexes locked, handle them now. */ /* 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)) if (__builtin_expect (robust != NULL, 0))
{ {
do do
{ {
pthread_mutex_t *this = robust; struct __pthread_mutex_s *this = robust;
robust = robust->__data.__next; robust = robust->__next;
assert (lll_mutex_islocked (this->__data.__lock)); assert (lll_mutex_islocked (this->__lock));
this->__data.__count = 0; this->__count = 0;
--this->__data.__nusers; --this->__nusers;
assert (this->__data.__owner != PTHREAD_MUTEX_NOTRECOVERABLE); assert (this->__owner != PTHREAD_MUTEX_NOTRECOVERABLE);
this->__data.__owner = PTHREAD_MUTEX_OWNERDEAD; this->__owner = PTHREAD_MUTEX_OWNERDEAD;
this->__data.__next = NULL; this->__next = NULL;
#ifdef __PTHREAD_MUTEX_HAVE_PREV #ifdef __PTHREAD_MUTEX_HAVE_PREV
this->__data.__prev = NULL; this->__prev = NULL;
#endif #endif
lll_mutex_unlock (this->__data.__lock); lll_mutex_unlock (this->__lock);
} }
while (robust != NULL); while (robust != NULL);

8
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. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or 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 /* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */ type is not exposed on purpose. */
typedef union __pthread_mutex_u typedef union
{ {
struct struct __pthread_mutex_s
{ {
int __lock; int __lock;
unsigned int __count; unsigned int __count;
@ -59,7 +59,7 @@ typedef union __pthread_mutex_u
union union
{ {
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
}; };
} __data; } __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T]; char __size[__SIZEOF_PTHREAD_MUTEX_T];

10
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. This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@ -45,9 +45,9 @@ typedef union
/* Data structures for mutex handling. The structure of the attribute /* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */ type is not exposed on purpose. */
typedef union __pthread_mutex_u typedef union
{ {
struct struct __pthread_mutex_s
{ {
int __lock; int __lock;
unsigned int __count; unsigned int __count;
@ -57,8 +57,8 @@ typedef union __pthread_mutex_u
binary compatibility. */ binary compatibility. */
int __kind; int __kind;
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
union __pthread_mutex_u *__prev; struct __pthread_mutex_s *__prev;
#define __PTHREAD_MUTEX_HAVE_PREV 1 #define __PTHREAD_MUTEX_HAVE_PREV 1
} __data; } __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T]; char __size[__SIZEOF_PTHREAD_MUTEX_T];

12
nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h

@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. PowerPC version. /* 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. This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. 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 /* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */ type is deliberately not exposed. */
typedef union __pthread_mutex_u typedef union
{ {
struct struct __pthread_mutex_s
{ {
int __lock; int __lock;
unsigned int __count; unsigned int __count;
@ -75,15 +75,15 @@ typedef union __pthread_mutex_u
int __kind; int __kind;
#if __WORDSIZE == 64 #if __WORDSIZE == 64
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
union __pthread_mutex_u *__prev; struct __pthread_mutex_s *__prev;
# define __PTHREAD_MUTEX_HAVE_PREV 1 # define __PTHREAD_MUTEX_HAVE_PREV 1
#else #else
unsigned int __nusers; unsigned int __nusers;
union union
{ {
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
}; };
#endif #endif
} __data; } __data;

12
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. This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. 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 /* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */ type is not exposed on purpose. */
typedef union __pthread_mutex_u typedef union
{ {
struct struct __pthread_mutex_s
{ {
int __lock; int __lock;
unsigned int __count; unsigned int __count;
@ -74,15 +74,15 @@ typedef union __pthread_mutex_u
int __kind; int __kind;
#if __WORDSIZE == 64 #if __WORDSIZE == 64
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
union __pthread_mutex_u *__prev; struct __pthread_mutex_s *__prev;
# define __PTHREAD_MUTEX_HAVE_PREV 1 # define __PTHREAD_MUTEX_HAVE_PREV 1
#else #else
unsigned int __nusers; unsigned int __nusers;
union union
{ {
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
}; };
#endif #endif
} __data; } __data;

12
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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -59,9 +59,9 @@ typedef union
/* Data structures for mutex handling. The structure of the attribute /* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */ type is not exposed on purpose. */
typedef union __pthread_mutex_u typedef union
{ {
struct struct __pthread_mutex_s
{ {
int __lock; int __lock;
unsigned int __count; unsigned int __count;
@ -74,15 +74,15 @@ typedef union __pthread_mutex_u
int __kind; int __kind;
#if __WORDSIZE == 64 #if __WORDSIZE == 64
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
union __pthread_mutex_u *__prev; struct __pthread_mutex_s *__prev;
# define __PTHREAD_MUTEX_HAVE_PREV 1 # define __PTHREAD_MUTEX_HAVE_PREV 1
#else #else
unsigned int __nusers; unsigned int __nusers;
union union
{ {
int __spins; int __spins;
union __pthread_mutex_u *__next; struct __pthread_mutex_s *__next;
}; };
#endif #endif
} __data; } __data;

Loading…
Cancel
Save