about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/i386/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/i386/tls.h')
-rw-r--r--linuxthreads/sysdeps/i386/tls.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index 17f6e0ae45..ed95e210c7 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -90,6 +90,13 @@ typedef struct
       asm ("hlt");							      \
   } while (0)
 
+
+/* Return the address of the dtv for the current thread.  */
+# define THREAD_DTV() \
+  ({ struct _pthread_descr_struct *__descr;				      \
+     THREAD_GETMEM (__descr, p_header.data.dtvp); })
+
+
 #endif
 
 #endif	/* tls.h */