From df45b31e8150087fad9ff5889fe1a95054e26730 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 19 Dec 2002 07:09:42 +0000 Subject: Update. 2002-12-18 Ulrich Drepper * 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. --- nptl/sysdeps/i386/tls.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'nptl/sysdeps/i386/tls.h') 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) \ -- cgit v1.1