From: gfleury <gfle...@disroot.org>

Message-ID: <20250209200108.865599-8-gfle...@disroot.org>
---
 htl/Makefile                                |  2 +-
 htl/Versions                                |  4 ++--
 sysdeps/htl/pt-barrier-wait.c               | 10 ++++++++--
 sysdeps/htl/pthreadP.h                      |  2 ++
 sysdeps/mach/hurd/i386/libc.abilist         |  2 ++
 sysdeps/mach/hurd/i386/libpthread.abilist   |  1 -
 sysdeps/mach/hurd/x86_64/libc.abilist       |  2 ++
 sysdeps/mach/hurd/x86_64/libpthread.abilist |  1 -
 8 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 76d65a5348..2b2a49c7b7 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -25,7 +25,6 @@ SYSDEPS := lockfile
 LCLHDRS :=
 
 libpthread-routines := \
-  pt-barrier-wait \
   pt-destroy-specific \
   pt-init-specific \
   pt-key-create \
@@ -157,6 +156,7 @@ routines := \
   pt-barrier \
   pt-barrier-destroy \
   pt-barrier-init \
+  pt-barrier-wait \
   pt-barrierattr-destroy \
   pt-barrierattr-getpshared \
   pt-barrierattr-init \
diff --git a/htl/Versions b/htl/Versions
index 8ab21238e6..1a69d44d77 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -28,6 +28,7 @@ libc {
     pthread_attr_init;
     pthread_barrier_destroy;
     pthread_barrier_init;
+    pthread_barrier_wait;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -132,6 +133,7 @@ libc {
   GLIBC_2.42 {
     pthread_barrier_destroy;
     pthread_barrier_init;
+    pthread_barrier_wait;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -214,8 +216,6 @@ libpthread {
 
     pthread_atfork;
 
-    pthread_barrier_wait;
-
     pthread_cancel;
 
     pthread_create; pthread_detach; pthread_exit;
diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c
index ec5b2262fd..7a106f2b7f 100644
--- a/sysdeps/htl/pt-barrier-wait.c
+++ b/sysdeps/htl/pt-barrier-wait.c
@@ -18,11 +18,11 @@
 
 #include <pthread.h>
 #include <assert.h>
-
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
-pthread_barrier_wait (pthread_barrier_t *barrier)
+__pthread_barrier_wait (pthread_barrier_t *barrier)
 {
   __pthread_spin_wait (&barrier->__lock);
   if (--barrier->__pending == 0)
@@ -68,3 +68,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier)
       return 0;
     }
 }
+libc_hidden_def (__pthread_barrier_wait)
+versioned_symbol (libc, __pthread_barrier_wait, pthread_barrier_wait, 
GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_barrier_wait, pthread_barrier_wait, 
GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index cb28124443..9ded2f8576 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -37,6 +37,8 @@ extern int __pthread_barrier_init (pthread_barrier_t 
*__barrier,
                                const pthread_barrierattr_t *__attr,
                                unsigned __count);
 libc_hidden_proto (__pthread_barrier_init)
+extern int __pthread_barrier_wait (pthread_barrier_t *__barrier);
+libc_hidden_proto (__pthread_barrier_wait)
 extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr);
 libc_hidden_proto (__pthread_barrierattr_destroy)
 extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t 
*__attr,
diff --git a/sysdeps/mach/hurd/i386/libc.abilist 
b/sysdeps/mach/hurd/i386/libc.abilist
index 2b994cfbe1..0a100f876d 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -51,6 +51,7 @@ GLIBC_2.12 pthread_attr_setstackaddr F
 GLIBC_2.12 pthread_attr_setstacksize F
 GLIBC_2.12 pthread_barrier_destroy F
 GLIBC_2.12 pthread_barrier_init F
+GLIBC_2.12 pthread_barrier_wait F
 GLIBC_2.12 pthread_barrierattr_destroy F
 GLIBC_2.12 pthread_barrierattr_getpshared F
 GLIBC_2.12 pthread_barrierattr_init F
@@ -2569,6 +2570,7 @@ GLIBC_2.41 pthread_mutexattr_settype F
 GLIBC_2.41 pthread_sigmask F
 GLIBC_2.42 pthread_barrier_destroy F
 GLIBC_2.42 pthread_barrier_init F
+GLIBC_2.42 pthread_barrier_wait F
 GLIBC_2.42 pthread_barrierattr_destroy F
 GLIBC_2.42 pthread_barrierattr_getpshared F
 GLIBC_2.42 pthread_barrierattr_init F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist 
b/sysdeps/mach/hurd/i386/libpthread.abilist
index ca80545f93..d85b9d6912 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -22,7 +22,6 @@ GLIBC_2.12 flockfile F
 GLIBC_2.12 ftrylockfile F
 GLIBC_2.12 funlockfile F
 GLIBC_2.12 pthread_atfork F
-GLIBC_2.12 pthread_barrier_wait F
 GLIBC_2.12 pthread_cancel F
 GLIBC_2.12 pthread_create F
 GLIBC_2.12 pthread_detach F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index d5984cc674..2266d3c846 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1533,6 +1533,7 @@ GLIBC_2.38 pthread_attr_setstackaddr F
 GLIBC_2.38 pthread_attr_setstacksize F
 GLIBC_2.38 pthread_barrier_destroy F
 GLIBC_2.38 pthread_barrier_init F
+GLIBC_2.38 pthread_barrier_wait F
 GLIBC_2.38 pthread_barrierattr_destroy F
 GLIBC_2.38 pthread_barrierattr_getpshared F
 GLIBC_2.38 pthread_barrierattr_init F
@@ -2252,6 +2253,7 @@ GLIBC_2.41 pthread_mutexattr_settype F
 GLIBC_2.41 pthread_sigmask F
 GLIBC_2.42 pthread_barrier_destroy F
 GLIBC_2.42 pthread_barrier_init F
+GLIBC_2.42 pthread_barrier_wait F
 GLIBC_2.42 pthread_barrierattr_destroy F
 GLIBC_2.42 pthread_barrierattr_getpshared F
 GLIBC_2.42 pthread_barrierattr_init F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist 
b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 848db31b53..37b6190c13 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -39,7 +39,6 @@ GLIBC_2.38 mtx_lock F
 GLIBC_2.38 mtx_timedlock F
 GLIBC_2.38 mtx_trylock F
 GLIBC_2.38 mtx_unlock F
-GLIBC_2.38 pthread_barrier_wait F
 GLIBC_2.38 pthread_cancel F
 GLIBC_2.38 pthread_clockjoin_np F
 GLIBC_2.38 pthread_create F
-- 
2.47.2


Reply via email to