aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/i386/tls.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-19 07:09:42 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-19 07:09:42 +0000
commitdf45b31e8150087fad9ff5889fe1a95054e26730 (patch)
tree5c3489fd9de8f22f9386144daea297828d00bd7a /nptl/sysdeps/i386/tls.h
parent5e2891795021a78fb975c55377d05919f4dae0c0 (diff)
downloadglibc-df45b31e8150087fad9ff5889fe1a95054e26730.zip
glibc-df45b31e8150087fad9ff5889fe1a95054e26730.tar.gz
glibc-df45b31e8150087fad9ff5889fe1a95054e26730.tar.bz2
Update.
2002-12-18 Ulrich Drepper <drepper@redhat.com> * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member. * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member. Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined. (INIT_SYSINFO): New #define. (TLS_TP_INIT): Use INIT_SYSINFO. * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): At test to make sure SYSINFO_OFFSET value is correct. * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
Diffstat (limited to 'nptl/sysdeps/i386/tls.h')
-rw-r--r--nptl/sysdeps/i386/tls.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 9f4b89f..3d535be 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -43,6 +43,7 @@ typedef struct
void *self; /* Pointer to the thread descriptor. */
list_t list;
int multiple_threads;
+ uintptr_t sysinfo;
} tcbhead_t;
#endif
@@ -62,6 +63,11 @@ typedef struct
/* Offset of the MULTIPLE_THREADS element in tcbhead_t. */
#define MULTIPLE_THREADS_OFFSET 20
+#ifdef NEED_DL_SYSINFO
+/* Offset of the SYSINFO element in tcbhead_t. */
+# define SYSINFO_OFFSET 24
+#endif
+
#ifndef __ASSEMBLER__
/* Get system call information. */
@@ -160,6 +166,13 @@ union user_desc_init
# define TLS_LOAD_EBX
# endif
+#if defined NEED_DL_SYSINFO && defined SHARED
+# define INIT_SYSINFO \
+ _head->sysinfo = GL(dl_sysinfo)
+#else
+# define INIT_SYSINFO
+#endif
+
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
@@ -172,6 +185,8 @@ union user_desc_init
_head->tcb = _thrdescr; \
/* For now the thread descriptor is at the same address. */ \
_head->self = _thrdescr; \
+ /* New syscall handling support. */ \
+ INIT_SYSINFO; \
\
/* The 'entry_number' field. Let the kernel pick a value. */ \
if (secondcall) \