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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user