mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
@ -81,7 +81,7 @@
|
||||
#if TLS_TCB_AT_TP
|
||||
# define TLS_TPADJ(pd) (pd)
|
||||
#elif TLS_DTV_AT_TP
|
||||
# define TLS_TPADJ(pd) ((pd) + 1)
|
||||
# define TLS_TPADJ(pd) ((struct pthread *)((char *) (pd) + TLS_PRE_TCB_SIZE))
|
||||
#endif
|
||||
|
||||
/* Cache handling for not-yet free stacks. */
|
||||
@ -296,8 +296,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||
pd = (struct pthread *) ((uintptr_t) attr->stackaddr
|
||||
- TLS_TCB_SIZE - adj);
|
||||
#elif TLS_DTV_AT_TP
|
||||
pd = (struct pthread *) ((uintptr_t) attr->stackaddr
|
||||
- __static_tls_size - adj) - 1;
|
||||
pd = (struct pthread *) (((uintptr_t) attr->stackaddr
|
||||
- __static_tls_size - adj)
|
||||
- TLS_PRE_TCB_SIZE);
|
||||
#endif
|
||||
|
||||
/* The user provided stack memory needs to be cleared. */
|
||||
@ -321,7 +322,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||
|
||||
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
|
||||
/* This is at least the second thread. */
|
||||
pd->header.multiple_threads = 1;
|
||||
p_multiple_threads (pd) = 1;
|
||||
#else
|
||||
__pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
|
||||
#endif
|
||||
@ -426,9 +427,10 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||
#if TLS_TCB_AT_TP
|
||||
pd = (struct pthread *) ((char *) mem + size - coloring) - 1;
|
||||
#elif TLS_DTV_AT_TP
|
||||
pd = (struct pthread *) (((uintptr_t) mem + size - coloring
|
||||
pd = (struct pthread *) ((((uintptr_t) mem + size - coloring
|
||||
- __static_tls_size)
|
||||
& ~__static_tls_align_m1) - 1;
|
||||
& ~__static_tls_align_m1)
|
||||
- TLS_PRE_TCB_SIZE);
|
||||
#endif
|
||||
|
||||
/* Remember the stack-related values. */
|
||||
@ -447,7 +449,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
||||
|
||||
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
|
||||
/* This is at least the second thread. */
|
||||
pd->header.multiple_threads = 1;
|
||||
p_multiple_threads (pd) = 1;
|
||||
#else
|
||||
__pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user