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

Message-ID: <20250209200108.865599-7-gfle...@disroot.org>
---
 htl/Makefile                                |  2 +-
 htl/Versions                                |  4 +++-
 sysdeps/htl/pt-barrier-init.c               | 10 ++++++++--
 sysdeps/htl/pthreadP.h                      |  4 ++++
 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, 20 insertions(+), 6 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index aa550109b6..76d65a5348 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -25,7 +25,6 @@ SYSDEPS := lockfile
 LCLHDRS :=
 
 libpthread-routines := \
-  pt-barrier-init \
   pt-barrier-wait \
   pt-destroy-specific \
   pt-init-specific \
@@ -157,6 +156,7 @@ routines := \
   pt-attr-setstacksize \
   pt-barrier \
   pt-barrier-destroy \
+  pt-barrier-init \
   pt-barrierattr-destroy \
   pt-barrierattr-getpshared \
   pt-barrierattr-init \
diff --git a/htl/Versions b/htl/Versions
index c464d8eb53..8ab21238e6 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -27,6 +27,7 @@ libc {
     pthread_attr_setschedparam;
     pthread_attr_init;
     pthread_barrier_destroy;
+    pthread_barrier_init;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -130,6 +131,7 @@ libc {
 
   GLIBC_2.42 {
     pthread_barrier_destroy;
+    pthread_barrier_init;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -212,7 +214,7 @@ libpthread {
 
     pthread_atfork;
 
-    pthread_barrier_init; pthread_barrier_wait;
+    pthread_barrier_wait;
 
     pthread_cancel;
 
diff --git a/sysdeps/htl/pt-barrier-init.c b/sysdeps/htl/pt-barrier-init.c
index 4854f7c183..0fc77c26eb 100644
--- a/sysdeps/htl/pt-barrier-init.c
+++ b/sysdeps/htl/pt-barrier-init.c
@@ -19,11 +19,11 @@
 #include <pthread.h>
 #include <string.h>
 #include <assert.h>
-
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
-pthread_barrier_init (pthread_barrier_t *barrier,
+__pthread_barrier_init (pthread_barrier_t *barrier,
                      const pthread_barrierattr_t *attr, unsigned count)
 {
   ASSERT_TYPE_SIZE (pthread_barrier_t, __SIZEOF_PTHREAD_BARRIER_T);
@@ -51,3 +51,9 @@ pthread_barrier_init (pthread_barrier_t *barrier,
   *barrier->__attr = *attr;
   return 0;
 }
+libc_hidden_def (__pthread_barrier_init)
+versioned_symbol (libc, __pthread_barrier_init, pthread_barrier_init, 
GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_barrier_init, pthread_barrier_init, 
GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 548adbe4af..cb28124443 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -33,6 +33,10 @@ extern void __pthread_init_static_tls (struct link_map *) 
attribute_hidden;
 
 extern int __pthread_barrier_destroy (pthread_barrier_t *__barrier);
 libc_hidden_proto (__pthread_barrier_destroy)
+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_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 91fc92a5aa..2b994cfbe1 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -50,6 +50,7 @@ GLIBC_2.12 pthread_attr_setstack F
 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_barrierattr_destroy F
 GLIBC_2.12 pthread_barrierattr_getpshared F
 GLIBC_2.12 pthread_barrierattr_init F
@@ -2567,6 +2568,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F
 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_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 c779be25ba..ca80545f93 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_init F
 GLIBC_2.12 pthread_barrier_wait F
 GLIBC_2.12 pthread_cancel F
 GLIBC_2.12 pthread_create F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index db01e3c58d..d5984cc674 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1532,6 +1532,7 @@ GLIBC_2.38 pthread_attr_setstack F
 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_barrierattr_destroy F
 GLIBC_2.38 pthread_barrierattr_getpshared F
 GLIBC_2.38 pthread_barrierattr_init F
@@ -2250,6 +2251,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F
 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_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 51f7f72278..848db31b53 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_init F
 GLIBC_2.38 pthread_barrier_wait F
 GLIBC_2.38 pthread_cancel F
 GLIBC_2.38 pthread_clockjoin_np F
-- 
2.47.2


Reply via email to