summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-01-06 21:55:58 +0000
committerJakub Jelinek <jakub@redhat.com>2006-01-06 21:55:58 +0000
commit8c45a85e617c71cf0279c4118d3811018626b45e (patch)
tree3fb19ed3bee25ce0505cf576057b8308f8c4bc06 /nptl
parentdd486f53ee367e1667c61ec1fffdb59f9a8130e9 (diff)
Updated to fedora-glibc-20060106T2148
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog16
-rw-r--r--nptl/descr.h26
-rw-r--r--nptl/pthread_create.c26
-rw-r--r--nptl/sysdeps/ia64/tcb-offsets.sym2
-rw-r--r--nptl/sysdeps/ia64/tls.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h12
10 files changed, 74 insertions, 58 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 73fc297317..a3d46cbf60 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,19 @@
+2006-01-06 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/ia64/tls.h (tcbhead_t): Rename private membe to __private.
+ * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
+ rename in tcbhead_t.
+
+ * 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/descr.h b/nptl/descr.h
index a9f830ef0b..2a607d3d21 100644
--- a/nptl/descr.h
+++ b/nptl/descr.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.
@@ -135,15 +135,15 @@ struct pthread
pid_t pid;
/* List of robust mutexes the thread is holding. */
- pthread_mutex_t *robust_list;
+ struct __pthread_mutex_s *robust_list;
#ifdef __PTHREAD_MUTEX_HAVE_PREV
# define ENQUEUE_MUTEX(mutex) \
do { \
mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \
- THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \
+ THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \
if (mutex->__data.__next != NULL) \
- mutex->__data.__next->__data.__prev = mutex; \
+ mutex->__data.__next->__prev = &mutex->__data; \
mutex->__data.__prev = NULL; \
} while (0)
# define DEQUEUE_MUTEX(mutex) \
@@ -151,9 +151,9 @@ struct pthread
if (mutex->__data.__prev == NULL) \
THREAD_SETMEM (THREAD_SELF, robust_list, mutex->__data.__next); \
else \
- mutex->__data.__prev->__data.__next = mutex->__data.__next; \
+ mutex->__data.__prev->__next = mutex->__data.__next; \
if (mutex->__data.__next != NULL) \
- mutex->__data.__next->__data.__prev = mutex->__data.__prev; \
+ mutex->__data.__next->__prev = mutex->__data.__prev; \
mutex->__data.__prev = NULL; \
mutex->__data.__next = NULL; \
} while (0)
@@ -161,19 +161,19 @@ struct pthread
# define ENQUEUE_MUTEX(mutex) \
do { \
mutex->__data.__next = THREAD_GETMEM (THREAD_SELF, robust_list); \
- THREAD_SETMEM (THREAD_SELF, robust_list, mutex); \
+ THREAD_SETMEM (THREAD_SELF, robust_list, &mutex->__data); \
} while (0)
# define DEQUEUE_MUTEX(mutex) \
do { \
- pthread_mutex_t *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \
- if (runp == mutex) \
- THREAD_SETMEM (THREAD_SELF, robust_list, runp->__data.__next); \
+ struct pthread_mutex_s *runp = THREAD_GETMEM (THREAD_SELF, robust_list); \
+ if (runp == &mutex->__data) \
+ THREAD_SETMEM (THREAD_SELF, robust_list, runp->__next); \
else \
{ \
- while (runp->__data.__next != mutex) \
- runp = runp->__data.__next; \
+ while (runp->__next != &mutex->__data) \
+ runp = runp->__next; \
\
- runp->__data.__next = runp->__data.__next->__data.__next; \
+ runp->__next = runp->__next->__next; \
mutex->__data.__next = NULL; \
} \
} while (0)
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/ia64/tcb-offsets.sym b/nptl/sysdeps/ia64/tcb-offsets.sym
index 3bc367082d..e1707ab1c8 100644
--- a/nptl/sysdeps/ia64/tcb-offsets.sym
+++ b/nptl/sysdeps/ia64/tcb-offsets.sym
@@ -4,4 +4,4 @@
PID offsetof (struct pthread, pid) - TLS_PRE_TCB_SIZE
TID offsetof (struct pthread, tid) - TLS_PRE_TCB_SIZE
MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) - TLS_PRE_TCB_SIZE
-SYSINFO_OFFSET offsetof (tcbhead_t, private)
+SYSINFO_OFFSET offsetof (tcbhead_t, __private)
diff --git a/nptl/sysdeps/ia64/tls.h b/nptl/sysdeps/ia64/tls.h
index eb773aa97d..69101ad8c4 100644
--- a/nptl/sysdeps/ia64/tls.h
+++ b/nptl/sysdeps/ia64/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/IA-64 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.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ typedef union dtv
typedef struct
{
dtv_t *dtv;
- void *private;
+ void *__private;
} tcbhead_t;
register struct pthread *__thread_self __asm__("r13");
@@ -113,9 +113,9 @@ register struct pthread *__thread_self __asm__("r13");
# define GET_DTV(descr) \
(((tcbhead_t *) (descr))->dtv)
-#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->private)
+#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->__private)
#define THREAD_SYSINFO(pd) \
- (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->private)
+ (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private)
#if defined NEED_DL_SYSINFO
# define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo)
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;