mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +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:
@ -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)
|
||||
|
Reference in New Issue
Block a user