aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-03-02 15:16:45 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-03-02 15:37:33 +0100
commitccdb68e829a31e4cda8339ea0d2dc3e51fb81ba5 (patch)
tree0a4bee357b253da9f85bce1cc2d79bf0f410c60a /sysdeps
parente5893e6349541d871e8a25120bca014551d13ff5 (diff)
downloadglibc-ccdb68e829a31e4cda8339ea0d2dc3e51fb81ba5.zip
glibc-ccdb68e829a31e4cda8339ea0d2dc3e51fb81ba5.tar.gz
glibc-ccdb68e829a31e4cda8339ea0d2dc3e51fb81ba5.tar.bz2
htl: move pthread_once into libc
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/libc-lockP.h3
-rw-r--r--sysdeps/htl/pt-once.c8
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist1
6 files changed, 12 insertions, 5 deletions
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h
index 5085570..092eb35 100644
--- a/sysdeps/htl/libc-lockP.h
+++ b/sysdeps/htl/libc-lockP.h
@@ -114,6 +114,7 @@ libc_hidden_proto (__pthread_rwlock_unlock)
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),
@@ -128,14 +129,12 @@ libc_hidden_proto (__pthread_setcancelstate)
weak_extern (__pthread_key_create)
weak_extern (__pthread_setspecific)
weak_extern (__pthread_getspecific)
-weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
# else
# pragma weak __pthread_key_create
# pragma weak __pthread_setspecific
# pragma weak __pthread_getspecific
-# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
# endif
diff --git a/sysdeps/htl/pt-once.c b/sysdeps/htl/pt-once.c
index 68fb2e1..1f999ce 100644
--- a/sysdeps/htl/pt-once.c
+++ b/sysdeps/htl/pt-once.c
@@ -20,6 +20,7 @@
#include <atomic.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
static void
clear_once_control (void *arg)
@@ -53,4 +54,9 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
return 0;
}
-weak_alias (__pthread_once, pthread_once);
+libc_hidden_def (__pthread_once)
+versioned_symbol (libc, __pthread_once, pthread_once, GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_once, pthread_once, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index bf62539..461df01 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -88,6 +88,7 @@ GLIBC_2.12 pthread_mutexattr_setprioceiling F
GLIBC_2.12 pthread_mutexattr_setprotocol F
GLIBC_2.12 pthread_mutexattr_setpshared F
GLIBC_2.12 pthread_mutexattr_settype F
+GLIBC_2.12 pthread_once F
GLIBC_2.12 pthread_rwlock_destroy F
GLIBC_2.12 pthread_rwlock_init F
GLIBC_2.12 pthread_rwlock_rdlock F
@@ -2595,6 +2596,7 @@ GLIBC_2.42 pthread_mutex_consistent_np F
GLIBC_2.42 pthread_mutex_getprioceiling F
GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
+GLIBC_2.42 pthread_once F
GLIBC_2.42 pthread_rwlock_clockrdlock F
GLIBC_2.42 pthread_rwlock_clockwrlock F
GLIBC_2.42 pthread_rwlock_destroy F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index d9c1a17..b067d37 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -35,7 +35,6 @@ GLIBC_2.12 pthread_key_create F
GLIBC_2.12 pthread_key_delete F
GLIBC_2.12 pthread_kill F
GLIBC_2.12 pthread_mutex_transfer_np F
-GLIBC_2.12 pthread_once F
GLIBC_2.12 pthread_setconcurrency F
GLIBC_2.12 pthread_setschedprio F
GLIBC_2.12 pthread_setspecific F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index fb068ab..6f235d2 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1579,6 +1579,7 @@ GLIBC_2.38 pthread_mutexattr_setpshared F
GLIBC_2.38 pthread_mutexattr_setrobust F
GLIBC_2.38 pthread_mutexattr_setrobust_np F
GLIBC_2.38 pthread_mutexattr_settype F
+GLIBC_2.38 pthread_once F
GLIBC_2.38 pthread_rwlock_clockrdlock F
GLIBC_2.38 pthread_rwlock_clockwrlock F
GLIBC_2.38 pthread_rwlock_destroy F
@@ -2278,6 +2279,7 @@ GLIBC_2.42 pthread_mutex_consistent_np F
GLIBC_2.42 pthread_mutex_getprioceiling F
GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
+GLIBC_2.42 pthread_once F
GLIBC_2.42 pthread_rwlock_clockrdlock F
GLIBC_2.42 pthread_rwlock_clockwrlock F
GLIBC_2.42 pthread_rwlock_destroy F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 71ce1d6..6b8acec 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -55,7 +55,6 @@ GLIBC_2.38 pthread_key_create F
GLIBC_2.38 pthread_key_delete F
GLIBC_2.38 pthread_kill F
GLIBC_2.38 pthread_mutex_transfer_np F
-GLIBC_2.38 pthread_once F
GLIBC_2.38 pthread_setconcurrency F
GLIBC_2.38 pthread_setschedprio F
GLIBC_2.38 pthread_setspecific F