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

nptl: Move pthread_once and __pthread_once into libc

And also the fork generation counter, __fork_generation.  This
eliminates the need for __fork_generation_pointer.

call_once remains in libpthread and calls the exported __pthread_once
symbol.

pthread_once and __pthread_once have been moved using
scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2021-04-21 19:49:50 +02:00
parent 4647ce82c7
commit 3fec7f18bf
70 changed files with 152 additions and 94 deletions

View File

@ -28,9 +28,6 @@
#include <ldsodefs.h>
unsigned long int *__fork_generation_pointer;
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
void
#else
@ -38,12 +35,9 @@ extern int __libc_multiple_threads attribute_hidden;
int *
#endif
__libc_pthread_init (unsigned long int *ptr, void (*reclaim) (void),
__libc_pthread_init (void (*reclaim) (void),
const struct pthread_functions *functions)
{
/* Remember the pointer to the generation counter in libpthread. */
__fork_generation_pointer = ptr;
/* Called by a child after fork. */
__register_atfork (NULL, NULL, reclaim, NULL);