From d4f64e1ad7d7836fbd9b01f9c5d410db930c38ce Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Mar 2003 08:50:36 +0000 Subject: 2003-03-10 Roland McGrath * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]: Instead of setting PD->multiple_threads, set globals __pthread_multiple_threads and __libc_multiple_threads. * sysdeps/pthread/createthread.c (create_thread): Likewise. * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it. * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise. * descr.h (struct pthread): Conditionalize first member on [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union containing an anonymous tcbhead_t. Move `list' member out. [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member. * allocatestack.c: Remove use of `header.data.' prefix. * pthread_create.c: Likewise. * init.c (__pthread_initialize_minimal_internal): Likewise. * sysdeps/pthread/createthread.c (create_thread): Likewise. * sysdeps/i386/tls.h (INSTALL_DTV): Add parens. (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix. * 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/i386/tls.h (tcbhead_t): Remove `list' member. * sysdeps/s390/tls.h (tcbhead_t): Likewise. --- nptl/sysdeps/x86_64/tls.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nptl/sysdeps/x86_64') diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index 66e878ef0b..ae1c66e373 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -84,12 +84,12 @@ typedef struct /* Install the dtv pointer. The pointer passed is to the element with index -1 which contain the length. */ # define INSTALL_DTV(descr, dtvp) \ - ((tcbhead_t *) (descr))->dtv = dtvp + 1 + ((tcbhead_t *) (descr))->dtv = (dtvp) + 1 /* Install new dtv for current thread. */ -# define INSTALL_NEW_DTV(dtv) \ +# define INSTALL_NEW_DTV(dtvp) \ ({ struct pthread *__pd; \ - THREAD_SETMEM (__pd, header.data.dtvp, dtv); }) + THREAD_SETMEM (__pd, dtv, (dtvp)); }) /* Return dtv of given thread descriptor. */ # define GET_DTV(descr) \ @@ -133,7 +133,7 @@ typedef struct /* Return the address of the dtv for the current thread. */ # define THREAD_DTV() \ ({ struct pthread *__pd; \ - THREAD_GETMEM (__pd, header.data.dtvp); }) + THREAD_GETMEM (__pd, dtv); }) /* Return the thread descriptor for the current thread. @@ -145,7 +145,7 @@ typedef struct # define THREAD_SELF \ ({ struct pthread *__self; \ asm ("movq %%fs:%c1,%0" : "=r" (__self) \ - : "i" (offsetof (struct pthread, header.data.self))); \ + : "i" (offsetof (struct pthread, self))); \ __self;}) -- cgit v1.2.3