about summary refs log tree commit diff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
commit3fec7f18bfcb7044e813a12e19c3c98eb8387e26 (patch)
tree63320bd00d52f0437c4f8676fbff561311dfdb8f /nptl/pthreadP.h
parent4647ce82c733d1453611e35236b786ecd7faf598 (diff)
downloadglibc-3fec7f18bfcb7044e813a12e19c3c98eb8387e26.tar.gz
glibc-3fec7f18bfcb7044e813a12e19c3c98eb8387e26.tar.xz
glibc-3fec7f18bfcb7044e813a12e19c3c98eb8387e26.zip
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>
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r--nptl/pthreadP.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index ab0e92f2ca..75fec43fed 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -361,12 +361,10 @@ extern unsigned long int *__fork_generation_pointer attribute_hidden;
 
 /* Register the generation counter in the libpthread with the libc.  */
 #ifdef TLS_MULTIPLE_THREADS_IN_TCB
-extern void __libc_pthread_init (unsigned long int *ptr,
-				 void (*reclaim) (void),
+extern void __libc_pthread_init (void (*reclaim) (void),
 				 const struct pthread_functions *functions);
 #else
-extern int *__libc_pthread_init (unsigned long int *ptr,
-				 void (*reclaim) (void),
+extern int *__libc_pthread_init (void (*reclaim) (void),
 				 const struct pthread_functions *functions);
 
 /* Variable set to a nonzero value either if more than one thread runs or ran,
@@ -525,6 +523,7 @@ extern void *__pthread_getspecific (pthread_key_t key);
 extern int __pthread_setspecific (pthread_key_t key, const void *value);
 extern int __pthread_once (pthread_once_t *once_control,
 			   void (*init_routine) (void));
+libc_hidden_proto (__pthread_once)
 extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void),
 			     void (*child) (void));
 extern pthread_t __pthread_self (void);
@@ -557,7 +556,6 @@ hidden_proto (__pthread_rwlock_unlock)
 hidden_proto (__pthread_key_create)
 hidden_proto (__pthread_getspecific)
 hidden_proto (__pthread_setspecific)
-hidden_proto (__pthread_once)
 hidden_proto (__pthread_setcancelstate)
 hidden_proto (__pthread_testcancel)
 hidden_proto (__pthread_mutexattr_init)