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

Message-ID: <20250209200108.865599-6-gfle...@disroot.org>
---
 htl/Makefile                                | 2 +-
 htl/Versions                                | 4 +++-
 sysdeps/htl/pt-barrier-destroy.c            | 9 ++++++++-
 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, 18 insertions(+), 5 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 6194bf87b0..aa550109b6 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -25,7 +25,6 @@ SYSDEPS := lockfile
 LCLHDRS :=
 
 libpthread-routines := \
-  pt-barrier-destroy \
   pt-barrier-init \
   pt-barrier-wait \
   pt-destroy-specific \
@@ -157,6 +156,7 @@ routines := \
   pt-attr-setstackaddr \
   pt-attr-setstacksize \
   pt-barrier \
+  pt-barrier-destroy \
   pt-barrierattr-destroy \
   pt-barrierattr-getpshared \
   pt-barrierattr-init \
diff --git a/htl/Versions b/htl/Versions
index cf8f86d764..c464d8eb53 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -26,6 +26,7 @@ libc {
     pthread_attr_setscope;
     pthread_attr_setschedparam;
     pthread_attr_init;
+    pthread_barrier_destroy;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -128,6 +129,7 @@ libc {
   }
 
   GLIBC_2.42 {
+    pthread_barrier_destroy;
     pthread_barrierattr_destroy;
     pthread_barrierattr_getpshared;
     pthread_barrierattr_init;
@@ -210,7 +212,7 @@ libpthread {
 
     pthread_atfork;
 
-    pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait;
+    pthread_barrier_init; pthread_barrier_wait;
 
     pthread_cancel;
 
diff --git a/sysdeps/htl/pt-barrier-destroy.c b/sysdeps/htl/pt-barrier-destroy.c
index c480875ed2..e7ff7030f8 100644
--- a/sysdeps/htl/pt-barrier-destroy.c
+++ b/sysdeps/htl/pt-barrier-destroy.c
@@ -18,9 +18,16 @@
 
 #include <pthread.h>
 #include <pt-internal.h>
+#include <shlib-compat.h>
 
 int
-pthread_barrier_destroy (pthread_barrier_t *barrier)
+__pthread_barrier_destroy (pthread_barrier_t *barrier)
 {
   return 0;
 }
+libc_hidden_def (__pthread_barrier_destroy)
+versioned_symbol (libc, __pthread_barrier_destroy, pthread_barrier_destroy, 
GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_barrier_destroy, pthread_barrier_destroy, 
GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index ae6a0cc7a6..548adbe4af 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -31,6 +31,8 @@ extern void __pthread_init_static_tls (struct link_map *) 
attribute_hidden;
 
 /* These represent the interface used by glibc itself.  */
 
+extern int __pthread_barrier_destroy (pthread_barrier_t *__barrier);
+libc_hidden_proto (__pthread_barrier_destroy)
 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 dc8627667f..91fc92a5aa 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -49,6 +49,7 @@ GLIBC_2.12 pthread_attr_setscope F
 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_barrierattr_destroy F
 GLIBC_2.12 pthread_barrierattr_getpshared F
 GLIBC_2.12 pthread_barrierattr_init F
@@ -2565,6 +2566,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F
 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_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 65fcf5e435..c779be25ba 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_destroy F
 GLIBC_2.12 pthread_barrier_init F
 GLIBC_2.12 pthread_barrier_wait F
 GLIBC_2.12 pthread_cancel F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index 8129eaf96c..db01e3c58d 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1531,6 +1531,7 @@ GLIBC_2.38 pthread_attr_setscope F
 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_barrierattr_destroy F
 GLIBC_2.38 pthread_barrierattr_getpshared F
 GLIBC_2.38 pthread_barrierattr_init F
@@ -2248,6 +2249,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F
 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_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 89e10c557c..51f7f72278 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_destroy F
 GLIBC_2.38 pthread_barrier_init F
 GLIBC_2.38 pthread_barrier_wait F
 GLIBC_2.38 pthread_cancel F
-- 
2.47.2


Reply via email to