about summary refs log tree commit diff
path: root/nptl/descr.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-14 22:34:02 +0000
committerRoland McGrath <roland@gnu.org>2003-03-14 22:34:02 +0000
commit55c11fbdb046ec06fb9f9bca2ae772a413354c74 (patch)
tree30c4b798aab9a3c4dded8a7332367f229d91f8a0 /nptl/descr.h
parent0eb18281696aa6c39d906cba552ce5438134b4e7 (diff)
downloadglibc-55c11fbdb046ec06fb9f9bca2ae772a413354c74.tar.gz
glibc-55c11fbdb046ec06fb9f9bca2ae772a413354c74.tar.xz
glibc-55c11fbdb046ec06fb9f9bca2ae772a413354c74.zip
2003-03-14 Roland McGrath <roland@redhat.com>
	* descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
	we always define the padding space.
	[!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
	stopped supporting its own extensions fully.
	[TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
	struct also called `header', so `header.multiple_threads' is the field
	name to use on all machines.
	* allocatestack.c (allocate_stack): Use `header.' prefix.
	* sysdeps/pthread/createthread.c (create_thread): Likewise.
	* pthread_create.c (__pthread_create_2_1): Likewise.
	* sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
	(THREAD_SELF): Likewise.
	* sysdeps/x86_64/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
	(SINGLE_THREAD_P): Likewise.
Diffstat (limited to 'nptl/descr.h')
-rw-r--r--nptl/descr.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/nptl/descr.h b/nptl/descr.h
index cbaa38fc3c..5a4c99c42f 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -57,17 +57,25 @@
 /* Thread descriptor data structure.  */
 struct pthread
 {
-#if !TLS_DTV_AT_TP
-  /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads.  */
   union
   {
-    tcbhead_t;
-    void *__padding[16];
-  };
+#if !TLS_DTV_AT_TP
+    /* This overlaps the TCB as used for TLS without threads (see tls.h).  */
+    tcbhead_t header;
 #elif TLS_MULTIPLE_THREADS_IN_TCB
-  int multiple_threads;
+    struct
+    {
+      int multiple_threads;
+    } header;
 #endif
 
+    /* This extra padding has no special purpose, and this structure layout
+       is private and subject to change without affecting the official ABI.
+       We just have it here in case it might be convenient for some
+       implementation-specific instrumentation hack or suchlike.  */
+    void *__padding[16];
+  };
+
   /* This descriptor's link on the `stack_used' or `__stack_user' list.  */
   list_t list;