diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-04-25 09:12:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-04-25 09:12:43 +0000 |
commit | 299601a1ef8df4532ded24194c4556e294ab1e6e (patch) | |
tree | 7e7338ca0004ce7fdba3e7429677ef0a5786ad8f /linuxthreads/descr.h | |
parent | 29bfc9453e2945b476cec5545f8409fd2a2ba886 (diff) | |
download | glibc-299601a1ef8df4532ded24194c4556e294ab1e6e.tar.gz glibc-299601a1ef8df4532ded24194c4556e294ab1e6e.tar.xz glibc-299601a1ef8df4532ded24194c4556e294ab1e6e.zip |
Update.
2003-04-22 Jakub Jelinek <jakub@redhat.com> * include/link.h (NO_TLS_OFFSET): Define to 0 if not defined. * elf/dl-close.c (_dl_close): Use NO_TLS_OFFSET. * elf/dl-object.c (_dl_new_object): Initialize l_tls_offset to NO_TLS_OFFSET. * elf/rtld.c (_dl_start_final, _dl_start): Likewise. * elf/dl-reloc.c (CHECK_STATIC_TLS): Use NO_TLS_OFFSET. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Likewise. * sysdeps/powerpc/dl-tls.h (TLS_TPREL_VALUE): Don't subtract TLS_TCB_SIZE.
Diffstat (limited to 'linuxthreads/descr.h')
-rw-r--r-- | linuxthreads/descr.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/linuxthreads/descr.h b/linuxthreads/descr.h index 2dcb37642a..dd496f6d0f 100644 --- a/linuxthreads/descr.h +++ b/linuxthreads/descr.h @@ -120,17 +120,14 @@ struct _pthread_descr_struct union dtv *dtvp; pthread_descr self; /* Pointer to this structure */ int multiple_threads; -#ifdef NEED_DL_SYSINFO +# define p_multiple_threads(descr) (descr)->p_header.data.multiple_threads +# ifdef NEED_DL_SYSINFO uintptr_t sysinfo; -#endif +# endif } data; void *__padding[16]; } p_header; -# define p_multiple_threads p_header.data.multiple_threads -#elif TLS_MULTIPLE_THREADS_IN_TCB - int p_multiple_threads; #endif - pthread_descr p_nextlive, p_prevlive; /* Double chaining of active threads */ pthread_descr p_nextwaiting; /* Next element in the queue holding the thr */ @@ -189,7 +186,22 @@ struct _pthread_descr_struct #endif size_t p_alloca_cutoff; /* Maximum size which should be allocated using alloca() instead of malloc(). */ - /* New elements must be added at the end. */ + /* New elements must be added at the end before __multiple_threads. */ +#if TLS_MULTIPLE_THREADS_IN_TCB + /* This field here isn't necessarily multiple_threads, which is really + the last integer in struct _pthread_descr_struct. */ + int __multiple_threads; +# define p_multiple_threads(descr) \ + (((union \ + { \ + struct _pthread_descr_struct s; \ + struct \ + { \ + char dummy[sizeof (struct _pthread_descr_struct) - sizeof (int)]; \ + int multiple_threads; \ + } m; \ + } *)(descr))->m.multiple_threads) +#endif } __attribute__ ((aligned(32))); /* We need to align the structure so that doubles are aligned properly. This is 8 bytes on MIPS and 16 bytes on MIPS64. |