---- glibc-20041208T1024/linuxthreads/sysdeps/alpha/tls.h 30 Jan 2003 21:03:40 -0000 1.5
-+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/alpha/tls.h 22 Sep 2004 21:20:55 -0000 1.5.2.1
-@@ -53,54 +53,76 @@ typedef struct
- # include <sysdep.h>
+--- glibc-20041208T1024/linuxthreads/ChangeLog 5 Dec 2004 09:39:04 -0000 1.831
++++ glibc-20041208T1024-fedora/linuxthreads/ChangeLog 7 Dec 2004 14:00:53 -0000 1.817.2.12
+@@ -710,6 +726,12 @@
+ (pthread_barrierattr_setpshared): Return EINVAL if pshared
+ is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
- /* This is the size of the initial TCB. */
--# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
-+# define TLS_INIT_TCB_SIZE 0
++2003-09-02 Jakub Jelinek <jakub@redhat.com>
++
++ * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
++ pthread is bigger than struct _pthread_descr_struct, use NPTL struct
++ pthread size.
++
+ 2003-09-02 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
+@@ -842,6 +864,34 @@
+
+ 2003-07-22 Jakub Jelinek <jakub@redhat.com>
+
++ * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
++ (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
++ _pthread_descr_struct.
++ (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
++ If in ld.so and NPTL struct pthread is bigger than struct
++ _pthread_descr_struct, use NPTL struct pthread size.
++ (TLS_TCB_OFFSET): Define.
++ (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
++ THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
++ definitions.
++ * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
++ pthread is bigger than struct _pthread_descr_struct, use NPTL struct
++ pthread size.
++ * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
++ * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
++ * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
++ * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
++ * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
++ * sysdeps/pthread/Makefile (gen-as-const-headers): Add
++ nptl-struct-pthread.sym if nptl tree is present.
++ (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
++ if nptl tree is not present.
++ (common-generated): Add nptl-struct-pthread.h.
++ ($(common-objpfx)nptl-struct-pthread.h): New rule.
++ * sysdeps/pthread/nptl-struct-pthread.sym: New file.
++
++2003-07-22 Jakub Jelinek <jakub@redhat.com>
++
+ * descr.h (struct _pthread_descr_struct): Provide p_res member
+ even if USE_TLS && HAVE___THREAD.
+ * sysdeps/pthread/res-state.c (__res_state): Return __resp
+--- glibc-20041208T1024/nptl/ChangeLog 7 Dec 2004 20:32:24 -0000 1.747
++++ glibc-20041208T1024-fedora/nptl/ChangeLog 8 Dec 2004 10:52:11 -0000 1.706.2.25
+@@ -2470,6 +2491,11 @@
+
+ * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
+
++2003-07-22 Jakub Jelinek <jakub@redhat.com>
++
++ * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
++ if __need_struct_pthread_size, instead define lll_lock_t.
++
+ 2003-07-25 Jakub Jelinek <jakub@redhat.com>
+
+ * tst-cancel17.c (do_test): Check if aio_cancel failed.
+--- glibc-2.3.5/linuxthreads/sysdeps/alpha/tls.h.orig 2003-01-30 22:03:40.000000000 +0100
++++ glibc-2.3.5/linuxthreads/sysdeps/alpha/tls.h 2005-04-15 20:48:27.000000000 +0200
+@@ -56,16 +56,23 @@ typedef struct
+ # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
-+# define TLS_INIT_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
++# define TLS_INIT_TCB_ALIGN 16
/* This is the size of the TCB. */
--# define TLS_TCB_SIZE sizeof (tcbhead_t)
-+# define TLS_TCB_SIZE 0
+ # define TLS_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (tcbhead_t)
-+# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
++# define TLS_TCB_ALIGN 16
/* This is the size we need before TCB. */
--# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
+# ifndef IS_IN_rtld
-+# define TLS_PRE_TCB_SIZE \
-+ (sizeof (struct _pthread_descr_struct) \
-+ + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
+ # define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
+# else
+# include <nptl-struct-pthread.h>
+# define TLS_PRE_TCB_SIZE \
-+ ((sizeof (struct _pthread_descr_struct) > NPTL_STRUCT_PTHREAD_SIZE \
-+ ? sizeof (struct _pthread_descr_struct) : NPTL_STRUCT_PTHREAD_SIZE) \
-+ + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
++ (sizeof (struct _pthread_descr_struct) > NPTL_STRUCT_PTHREAD_SIZE \
++ ? sizeof (struct _pthread_descr_struct) : NPTL_STRUCT_PTHREAD_SIZE)
+# endif
/* The DTV is allocated at the TP; the TCB is placed elsewhere. */
# define TLS_DTV_AT_TP 1
-
-+/* The following assumes that TP (R2 or R13) points to the end of the
-+ TCB + 0x7000 (per the ABI). This implies that TCB address is
-+ TP - 0x7000. As we define TLS_DTV_AT_TP we can
-+ assume that the pthread struct is allocated immediately ahead of the
-+ TCB. This implies that the pthread_descr address is
-+ TP - (TLS_PRE_TCB_SIZE + 0x7000). */
-+/* ??? PPC uses offset 0x7000; seems like a good idea for alpha too,
-+ but binutils not yet changed to match. */
-+# define TLS_TCB_OFFSET 0
-+
- /* Install the dtv pointer. The pointer passed is to the element with
- index -1 which contain the length. */
- # define INSTALL_DTV(TCBP, DTVP) \
-- (((tcbhead_t *) (TCBP))->dtv = (DTVP) + 1)
-+ (((tcbhead_t *) (TCBP))[-1].dtv = (DTVP) + 1)
-
- /* Install new dtv for current thread. */
- # define INSTALL_NEW_DTV(DTV) \
-- (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (DTV))
-+ (THREAD_DTV() = (DTV))
-
- /* Return dtv of given thread descriptor. */
- # define GET_DTV(TCBP) \
-- (((tcbhead_t *) (TCBP))->dtv)
-+ (((tcbhead_t *) (TCBP))[-1].dtv)
-
- /* Code to initially initialize the thread pointer. This might need
+@@ -87,7 +94,7 @@ typedef struct
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(TCBP, SECONDCALL) \
- (__builtin_set_thread_pointer (TCBP), 0)
-+ (__builtin_set_thread_pointer ((void *) (TCBP) + TLS_TCB_OFFSET), NULL)
++ (__builtin_set_thread_pointer ((void*)(TCBP)), NULL)
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
-- (((tcbhead_t *)__builtin_thread_pointer ())->dtv)
-+ (((tcbhead_t *) (__builtin_thread_pointer () - TLS_TCB_OFFSET))[-1].dtv)
-
- /* Return the thread descriptor for the current thread. */
- # undef THREAD_SELF
- # define THREAD_SELF \
-- ((pthread_descr)__builtin_thread_pointer () - 1)
-+ ((pthread_descr) (__builtin_thread_pointer () \
-+ - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
-
- # undef INIT_THREAD_SELF
- # define INIT_THREAD_SELF(DESCR, NR) \
-- __builtin_set_thread_pointer ((struct _pthread_descr_struct *)(DESCR) + 1)
-+ __builtin_set_thread_pointer ((char *)(DESCR) \
-+ + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
-
- /* Get the thread descriptor definition. */
- # include <linuxthreads/descr.h>
--- glibc-20041208T1024/linuxthreads/sysdeps/i386/tls.h 19 Oct 2004 05:12:58 -0000 1.37
+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/i386/tls.h 20 Oct 2004 10:47:17 -0000 1.35.2.4
@@ -81,7 +81,14 @@ typedef struct
+#ifdef HAVE_TLS_SUPPORT
+NPTL_STRUCT_PTHREAD_SIZE sizeof (struct pthread)
+#endif
---- glibc-20041208T1024/linuxthreads/sysdeps/pthread/posix-timer.h 26 Aug 2002 22:39:43 -0000 1.9
-+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/pthread/posix-timer.h 3 Dec 2004 11:20:49 -0000 1.9.2.1
-@@ -1,5 +1,5 @@
- /* Definitions for POSIX timer implementation on top of LinuxThreads.
-- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
-+ Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
-@@ -85,12 +85,6 @@ extern int __timer_init_failed;
- /* A distinct thread is used for each clock type. */
-
- extern struct thread_node __timer_signal_thread_rclk;
--#ifdef _POSIX_CPUTIME
--extern struct thread_node __timer_signal_thread_pclk;
--#endif
--#ifdef _POSIX_THREAD_CPUTIME
--extern struct thread_node __timer_signal_thread_tclk;
--#endif
-
-
- /* Return pointer to timer structure corresponding to ID. */
---- glibc-20041208T1024/linuxthreads/sysdeps/pthread/timer_create.c 18 Apr 2004 02:31:21 -0000 1.10
-+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/pthread/timer_create.c 3 Dec 2004 11:20:49 -0000 1.10.2.1
-@@ -94,24 +94,7 @@ timer_create (clock_id, evp, timerid)
- case SIGEV_SIGNAL:
- /* We have a global thread for delivering timed signals.
- If it is not running, try to start it up. */
-- switch (clock_id)
-- {
-- case CLOCK_REALTIME:
-- default:
-- thread = &__timer_signal_thread_rclk;
-- break;
--#ifdef _POSIX_CPUTIME
-- case CLOCK_PROCESS_CPUTIME_ID:
-- thread = &__timer_signal_thread_pclk;
-- break;
--#endif
--#ifdef _POSIX_THREAD_CPUTIME
-- case CLOCK_THREAD_CPUTIME_ID:
-- thread = &__timer_signal_thread_tclk;
-- break;
--#endif
-- }
--
-+ thread = &__timer_signal_thread_rclk;
- if (! thread->exists)
- {
- if (__builtin_expect (__timer_thread_start (thread),
---- glibc-20041208T1024/linuxthreads/sysdeps/pthread/timer_routines.c 18 Apr 2004 02:31:48 -0000 1.23
-+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/pthread/timer_routines.c 3 Dec 2004 11:20:49 -0000 1.23.2.1
-@@ -52,12 +52,6 @@ int __timer_init_failed;
-
- /* Node for the thread used to deliver signals. */
- struct thread_node __timer_signal_thread_rclk;
--#ifdef _POSIX_CPUTIME
--struct thread_node __timer_signal_thread_pclk;
--#endif
--#ifdef _POSIX_THREAD_CPUTIME
--struct thread_node __timer_signal_thread_tclk;
--#endif
-
- /* Lists to keep free and used timers and threads. */
- struct list_links timer_free_list;
-@@ -190,12 +184,6 @@ init_module (void)
- list_append (&thread_free_list, &thread_array[i].links);
-
- thread_init (&__timer_signal_thread_rclk, 0, CLOCK_REALTIME);
--#ifdef _POSIX_CPUTIME
-- thread_init (&__timer_signal_thread_pclk, 0, CLOCK_PROCESS_CPUTIME_ID);
--#endif
--#ifdef _POSIX_THREAD_CPUTIME
-- thread_init (&__timer_signal_thread_tclk, 0, CLOCK_THREAD_CPUTIME_ID);
--#endif
- }
-
-
-@@ -280,12 +268,6 @@ thread_cleanup (void *val)
-
- /* How did the signal thread get killed? */
- assert (thread != &__timer_signal_thread_rclk);
--#ifdef _POSIX_CPUTIME
-- assert (thread != &__timer_signal_thread_pclk);
--#endif
--#ifdef _POSIX_THREAD_CPUTIME
-- assert (thread != &__timer_signal_thread_tclk);
--#endif
-
- pthread_mutex_lock (&__timer_mutex);
-
--- glibc-20041208T1024/linuxthreads/sysdeps/s390/tls.h 30 Jan 2003 18:34:11 -0000 1.3
+++ glibc-20041208T1024-fedora/linuxthreads/sysdeps/s390/tls.h 22 Sep 2004 21:20:56 -0000 1.3.2.1
@@ -72,7 +72,14 @@ typedef struct