]> sourceware.org Git - glibc.git/commit
nptl: Eliminate the __static_tls_size, __static_tls_align_m1 variables
authorFlorian Weimer <fweimer@redhat.com>
Fri, 21 May 2021 20:35:00 +0000 (22:35 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 21 May 2021 20:35:00 +0000 (22:35 +0200)
commitd03511f48f49fcb9bec4305586c26ab5d0063022
tree7608e5705c830e8c710e785e3bfc5a90e8986cb4
parent2f69522d460611b1018e15df6c238dda2d8d6609
nptl: Eliminate the __static_tls_size, __static_tls_align_m1 variables

Use the  __nptl_tls_static_size_for_stack inline function instead,
and the GLRO (dl_tls_static_align) value directly.

The computation of GLRO (dl_tls_static_align)  in
_dl_determine_tlsoffset ensures that the alignment is at least
TLS_TCB_ALIGN, which at least STACK_ALIGN (see allocate_stack).
Therefore, the additional rounding-up step is removed.

ALso move the initialization of the default stack size from
__pthread_initialize_minimal_internal to __pthread_early_init.
This introduces an extra system call during single-threaded startup,
but this simplifies the initialization sequence.  No locking is
needed around the writes to __default_pthread_attr because the
process is single-threaded at this point.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/dl-tls.c
nptl/allocatestack.c
nptl/nptl-init.c
nptl/nptl-stack.h
nptl/pthreadP.h
sysdeps/nptl/pthread_early_init.h
This page took 0.04462 seconds and 5 git commands to generate.