diff options
author | Roland McGrath <roland@hack.frob.com> | 2014-10-17 15:03:00 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2014-10-17 15:03:00 -0700 |
commit | 674b89786e04a4addc79d70e025848f1e0116a41 (patch) | |
tree | f74ab3ca737fbdf509e9cb02dac99bddda136f30 /sysdeps | |
parent | 184ee94010786a9e0952aff3af39eba1d72287d3 (diff) | |
download | glibc-674b89786e04a4addc79d70e025848f1e0116a41.tar glibc-674b89786e04a4addc79d70e025848f1e0116a41.tar.gz glibc-674b89786e04a4addc79d70e025848f1e0116a41.tar.bz2 glibc-674b89786e04a4addc79d70e025848f1e0116a41.zip |
NPTL: Clean up THREAD_SYSINFO macros.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/nptl/tls.h | 9 | ||||
-rw-r--r-- | sysdeps/ia64/nptl/tls.h | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h index d7302ba8aa..dd90978f69 100644 --- a/sysdeps/i386/nptl/tls.h +++ b/sysdeps/i386/nptl/tls.h @@ -141,9 +141,6 @@ union user_desc_init # define GET_DTV(descr) \ (((tcbhead_t *) (descr))->dtv) -#define THREAD_SELF_SYSINFO THREAD_GETMEM (THREAD_SELF, header.sysinfo) -#define THREAD_SYSINFO(pd) ((pd)->header.sysinfo) - /* Macros to load from and store into segment registers. */ # ifndef TLS_GET_GS # define TLS_GET_GS() \ @@ -154,9 +151,13 @@ union user_desc_init __asm ("movw %w0, %%gs" :: "q" (val)) # endif -#if defined NEED_DL_SYSINFO +#ifdef NEED_DL_SYSINFO # define INIT_SYSINFO \ _head->sysinfo = GLRO(dl_sysinfo) +# define SETUP_THREAD_SYSINFO(pd) \ + ((pd)->header.sysinfo = THREAD_GETMEM (THREAD_SELF, header.sysinfo)) +# define CHECK_THREAD_SYSINFO(pd) \ + assert ((pd)->header.sysinfo == THREAD_GETMEM (THREAD_SELF, header.sysinfo)) #else # define INIT_SYSINFO #endif diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h index e38352a973..8805f851e6 100644 --- a/sysdeps/ia64/nptl/tls.h +++ b/sysdeps/ia64/nptl/tls.h @@ -109,8 +109,12 @@ register struct pthread *__thread_self __asm__("r13"); #define THREAD_SYSINFO(pd) \ (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private) -#if defined NEED_DL_SYSINFO +#ifdef NEED_DL_SYSINFO # define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo) +# define SETUP_THREAD_SYSINFO(pd) \ + (THREAD_SYSINFO (pd) = THREAD_SELF_SYSINFO) +# define CHECK_THREAD_SYSINFO(pd) \ + assert (THREAD_SYSINFO (pd) == THREAD_SELF_SYSINFO) #else # define INIT_SYSINFO NULL #endif |