about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-07 08:44:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-07 08:44:37 +0000
commitcd30b01ee9cdefd2e6f81b1c25ee6897243706fc (patch)
tree39d460bf6b86baf4199f85a9f26d64913b82992e /linuxthreads/sysdeps/i386
parent8d4b5a8a50fad0ed1005380aa8d1c13dcfdab08d (diff)
downloadglibc-cd30b01ee9cdefd2e6f81b1c25ee6897243706fc.tar.gz
glibc-cd30b01ee9cdefd2e6f81b1c25ee6897243706fc.tar.xz
glibc-cd30b01ee9cdefd2e6f81b1c25ee6897243706fc.zip
Update.
2002-02-07  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Account for
	alignment of the TCB and store total size and alignment of static
	TLS block in _dl_tls_static_size and _dl_tls_static_align.
	tls_index is a typedef.
	* sysdeps/generic/ldsodefs.h: Declare _dl_tls_static_size and
	_dl_tls_static_align.
	* sysdeps/i386/dl-tls.h: tls_index is a typedef.
	* elf/dl-support.c: Define _dl_tls_static_size and
	_dl_tls_static_align.
Diffstat (limited to 'linuxthreads/sysdeps/i386')
-rw-r--r--linuxthreads/sysdeps/i386/tls.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index 870832c6f0..ed5e634a82 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -42,7 +42,7 @@ typedef struct
 
 
 /* We can support TLS only if the floating-stack support is available.  */
-#if FLOATING_STACKS && defined HAVE_TLS_SUPPORT
+#ifdef HAVE_TLS_SUPPORT
 
 /* Get system call information.  */
 # include <sysdep.h>
@@ -94,11 +94,16 @@ typedef struct
 
 
 /* Return the address of the dtv for the current thread.  */
-# define THREAD_DTV() \
+# if FLOATING_STACKS
+#  define THREAD_DTV() \
   ({ struct _pthread_descr_struct *__descr;				      \
      THREAD_GETMEM (__descr, p_header.data.dtvp); })
+# else
+#  define THREAD_DTV() \
+  ({ struct _pthread_descr_struct *__descr = thread_self ();		      \
+     THREAD_GETMEM (__descr, p_header.data.dtvp); })
+# endif
 
-
-#endif
+#endif	/* HAVE_TLS_SUPPORT */
 
 #endif	/* tls.h */