1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

nptl: Export __libc_multiple_threads from libc as an internal symbol

This allows the elimination of the __libc_multiple_threads_ptr
variable in libpthread and its initialization procedure.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Florian Weimer
2021-05-10 10:31:41 +02:00
parent d6163dfd38
commit 321789f61a
8 changed files with 13 additions and 30 deletions

View File

@ -27,20 +27,9 @@
#include <sysdep.h>
#include <ldsodefs.h>
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
void
#else
extern int __libc_multiple_threads attribute_hidden;
int *
#endif
__libc_pthread_init (void (*reclaim) (void))
{
/* Called by a child after fork. */
__register_atfork (NULL, NULL, reclaim, NULL);
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
return &__libc_multiple_threads;
#endif
}