about summary refs log tree commit diff
path: root/linuxthreads/descr.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-02 11:45:12 +0000
committerRoland McGrath <roland@gnu.org>2003-03-02 11:45:12 +0000
commitbb0ddc2f1eca652aa8af56825b2ba3182498cc5a (patch)
tree8b03305facff745ff0bd14c50e811dfd77cef343 /linuxthreads/descr.h
parent3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4 (diff)
downloadglibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.tar.gz
glibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.tar.xz
glibc-bb0ddc2f1eca652aa8af56825b2ba3182498cc5a.zip
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_fixup_plt):
	Don't use weak_extern for dl_rtld_map.  Instead check only if [SHARED].
	(elf_machine_rela): Clean up.

	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up.

	PowerPC TLS support contributed by Paul Mackerras <paulus@samba.org>.
	* sysdeps/powerpc/powerpc32/elf/configure.in: New file.
	* sysdeps/powerpc/powerpc32/elf/configure: New generated file.
	* elf/tls-macros.h [__powerpc__ && !__powerpc64__]
	(TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them.
	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support
	new relocs for TLS.

	* sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these
	macros out of [SHARED].
	(TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros.

	* elf/elf.h: Define R_PPC_* relocs for TLS support.
	Clean up R_PPC64_* macro definition comments.
Diffstat (limited to 'linuxthreads/descr.h')
-rw-r--r--linuxthreads/descr.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/linuxthreads/descr.h b/linuxthreads/descr.h
index d266ffb126..2dcb37642a 100644
--- a/linuxthreads/descr.h
+++ b/linuxthreads/descr.h
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 #include <hp-timing.h>
+#include <tls.h>
 
 /* Fast thread-specific data internal to libc.  */
 enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
@@ -106,11 +107,14 @@ typedef struct _pthread_rwlock_info {
 
 union dtv;
 
-
-struct _pthread_descr_struct {
-  /* XXX Remove this union for IA-64 style TLS module */
-  union {
-    struct {
+struct _pthread_descr_struct
+{
+#if !defined USE_TLS || !TLS_DTV_AT_TP
+  /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads.  */
+  union
+  {
+    struct
+    {
       void *tcb;		/* Pointer to the TCB.  This is not always
 				   the address of this thread descriptor.  */
       union dtv *dtvp;
@@ -122,6 +126,11 @@ struct _pthread_descr_struct {
     } data;
     void *__padding[16];
   } p_header;
+# define p_multiple_threads p_header.data.multiple_threads
+#elif TLS_MULTIPLE_THREADS_IN_TCB
+  int p_multiple_threads;
+#endif
+
   pthread_descr p_nextlive, p_prevlive;
                                 /* Double chaining of active threads */
   pthread_descr p_nextwaiting;  /* Next element in the queue holding the thr */