From 3fec7f18bfcb7044e813a12e19c3c98eb8387e26 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 21 Apr 2021 19:49:50 +0200 Subject: 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 --- sysdeps/nptl/fork.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sysdeps/nptl/fork.c') diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c index 9737127cd6..ccdda11a7c 100644 --- a/sysdeps/nptl/fork.c +++ b/sysdeps/nptl/fork.c @@ -88,8 +88,7 @@ __libc_fork (void) struct pthread *self = THREAD_SELF; /* See __pthread_once. */ - if (__fork_generation_pointer != NULL) - *__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR; + __fork_generation += __PTHREAD_ONCE_FORK_GEN_INCR; /* Initialize the robust mutex list setting in the kernel which has been reset during the fork. We do not check for errors because if -- cgit 1.4.1