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

Signed-off-by: gfleury <gfle...@disroot.org>
Message-ID: <20250216145434.7089-7-gfle...@disroot.org>
---
 htl/Makefile                                | 2 +-
 htl/Versions                                | 4 +++-
 htl/pt-initialize.c                         | 1 -
 sysdeps/htl/libc-lockP.h                    | 3 +--
 sysdeps/htl/pt-rwlock-unlock.c              | 8 +++++++-
 sysdeps/htl/pthread-functions.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 -
 10 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 0c85ab462c..d5ab98c840 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -51,7 +51,6 @@ libpthread-routines := \
   pt-rwlock-wrlock \
   pt-rwlock-timedrdlock \
   pt-rwlock-timedwrlock \
-  pt-rwlock-unlock \
   pt-hurd-cond-wait \
   pt-hurd-cond-timedwait \
   pt-stack-alloc \
@@ -197,6 +196,7 @@ routines := \
   pt-rwlock-attr \
   pt-rwlock-tryrdlock \
   pt-rwlock-trywrlock \
+  pt-rwlock-unlock \
   pt-rwlockattr-destroy \
   pt-rwlockattr-getpshared \
   pt-rwlockattr-init \
diff --git a/htl/Versions b/htl/Versions
index ca59cd5c99..9669fe9dbc 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -65,6 +65,7 @@ libc {
     pthread_mutexattr_settype;
     pthread_rwlock_tryrdlock;
     pthread_rwlock_trywrlock;
+    pthread_rwlock_unlock;
     pthread_rwlockattr_destroy;
     pthread_rwlockattr_getpshared;
     pthread_rwlockattr_init;
@@ -150,6 +151,7 @@ libc {
     pthread_mutex_trylock;
     pthread_rwlock_tryrdlock;
     pthread_rwlock_trywrlock;
+    pthread_rwlock_unlock;
     pthread_rwlockattr_destroy;
     pthread_rwlockattr_getpshared;
     pthread_rwlockattr_init;
@@ -251,7 +253,7 @@ libpthread {
 
     pthread_rwlock_destroy; pthread_rwlock_init; pthread_rwlock_rdlock;
     pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock;
-    pthread_rwlock_unlock; pthread_rwlock_wrlock;
+    pthread_rwlock_wrlock;
 
     pthread_setconcurrency;
     pthread_setschedprio; pthread_setspecific;
diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c
index 53b9c76e8f..14172099d4 100644
--- a/htl/pt-initialize.c
+++ b/htl/pt-initialize.c
@@ -32,7 +32,6 @@ static const struct pthread_functions pthread_functions = {
   .ptr_pthread_once = __pthread_once,
   .ptr_pthread_rwlock_rdlock = __pthread_rwlock_rdlock,
   .ptr_pthread_rwlock_wrlock = __pthread_rwlock_wrlock,
-  .ptr_pthread_rwlock_unlock = __pthread_rwlock_unlock,
   .ptr___pthread_key_create = __pthread_key_create,
   .ptr___pthread_getspecific = __pthread_getspecific,
   .ptr___pthread_setspecific = __pthread_setspecific,
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h
index 5fad451dfc..7e9bdd1c4b 100644
--- a/sysdeps/htl/libc-lockP.h
+++ b/sysdeps/htl/libc-lockP.h
@@ -106,6 +106,7 @@ extern int __pthread_rwlock_trywrlock (pthread_rwlock_t 
*__rwlock);
 libc_hidden_proto (__pthread_rwlock_trywrlock)
 
 extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
+libc_hidden_proto (__pthread_rwlock_unlock)
 
 extern int __pthread_once (pthread_once_t *__once_control,
                           void (*__init_routine) (void));
@@ -124,7 +125,6 @@ weak_extern (__pthread_rwlock_init)
 weak_extern (__pthread_rwlock_destroy)
 weak_extern (__pthread_rwlock_rdlock)
 weak_extern (__pthread_rwlock_wrlock)
-weak_extern (__pthread_rwlock_unlock)
 weak_extern (__pthread_key_create)
 weak_extern (__pthread_setspecific)
 weak_extern (__pthread_getspecific)
@@ -135,7 +135,6 @@ weak_extern (__pthread_atfork)
 #  pragma weak __pthread_rwlock_destroy
 #  pragma weak __pthread_rwlock_rdlock
 #  pragma weak __pthread_rwlock_wrlock
-#  pragma weak __pthread_rwlock_unlock
 #  pragma weak __pthread_key_create
 #  pragma weak __pthread_setspecific
 #  pragma weak __pthread_getspecific
diff --git a/sysdeps/htl/pt-rwlock-unlock.c b/sysdeps/htl/pt-rwlock-unlock.c
index 6465ace772..5012add1f9 100644
--- a/sysdeps/htl/pt-rwlock-unlock.c
+++ b/sysdeps/htl/pt-rwlock-unlock.c
@@ -19,6 +19,7 @@
 #include <pthread.h>
 
 #include <pt-internal.h>
+#include <shlib-compat.h>
 
 /* Unlock *RWLOCK, rescheduling a waiting writer thread or, if there
    are no threads waiting for a write lock, rescheduling the reader
@@ -95,4 +96,9 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
   __pthread_spin_unlock (&rwlock->__lock);
   return 0;
 }
-weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock);
+libc_hidden_def (__pthread_rwlock_unlock)
+versioned_symbol (libc, __pthread_rwlock_unlock, pthread_rwlock_unlock, 
GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_rwlock_unlock, pthread_rwlock_unlock, 
GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index 56b5b2383e..7dd6fadc17 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -26,7 +26,6 @@ struct __pthread_cancelation_handler 
**__pthread_get_cleanup_stack (void);
 int __pthread_once (pthread_once_t *, void (*) (void));
 int __pthread_rwlock_rdlock (pthread_rwlock_t *);
 int __pthread_rwlock_wrlock (pthread_rwlock_t *);
-int __pthread_rwlock_unlock (pthread_rwlock_t *);
 int __pthread_key_create (pthread_key_t *, void (*) (void *));
 void *__pthread_getspecific (pthread_key_t);
 int __pthread_setspecific (pthread_key_t, const void *);
@@ -45,7 +44,6 @@ struct pthread_functions
   int (*ptr_pthread_once) (pthread_once_t *, void (*) (void));
   int (*ptr_pthread_rwlock_rdlock) (pthread_rwlock_t *);
   int (*ptr_pthread_rwlock_wrlock) (pthread_rwlock_t *);
-  int (*ptr_pthread_rwlock_unlock) (pthread_rwlock_t *);
   int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
   void *(*ptr___pthread_getspecific) (pthread_key_t);
   int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
diff --git a/sysdeps/mach/hurd/i386/libc.abilist 
b/sysdeps/mach/hurd/i386/libc.abilist
index 3d786282fa..8df2a87d6a 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -90,6 +90,7 @@ GLIBC_2.12 pthread_mutexattr_setpshared F
 GLIBC_2.12 pthread_mutexattr_settype F
 GLIBC_2.12 pthread_rwlock_tryrdlock F
 GLIBC_2.12 pthread_rwlock_trywrlock F
+GLIBC_2.12 pthread_rwlock_unlock F
 GLIBC_2.12 pthread_rwlockattr_destroy F
 GLIBC_2.12 pthread_rwlockattr_getpshared F
 GLIBC_2.12 pthread_rwlockattr_init F
@@ -2588,6 +2589,7 @@ GLIBC_2.42 pthread_mutex_setprioceiling F
 GLIBC_2.42 pthread_mutex_trylock F
 GLIBC_2.42 pthread_rwlock_tryrdlock F
 GLIBC_2.42 pthread_rwlock_trywrlock F
+GLIBC_2.42 pthread_rwlock_unlock F
 GLIBC_2.42 pthread_rwlockattr_destroy F
 GLIBC_2.42 pthread_rwlockattr_getpshared F
 GLIBC_2.42 pthread_rwlockattr_init F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist 
b/sysdeps/mach/hurd/i386/libpthread.abilist
index 70db951b10..8ba641f611 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -41,7 +41,6 @@ GLIBC_2.12 pthread_rwlock_init F
 GLIBC_2.12 pthread_rwlock_rdlock F
 GLIBC_2.12 pthread_rwlock_timedrdlock F
 GLIBC_2.12 pthread_rwlock_timedwrlock F
-GLIBC_2.12 pthread_rwlock_unlock F
 GLIBC_2.12 pthread_rwlock_wrlock F
 GLIBC_2.12 pthread_setconcurrency F
 GLIBC_2.12 pthread_setschedprio F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index 305cdb8cef..472c1b2ea8 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1581,6 +1581,7 @@ GLIBC_2.38 pthread_mutexattr_setrobust_np F
 GLIBC_2.38 pthread_mutexattr_settype F
 GLIBC_2.38 pthread_rwlock_tryrdlock F
 GLIBC_2.38 pthread_rwlock_trywrlock F
+GLIBC_2.38 pthread_rwlock_unlock F
 GLIBC_2.38 pthread_rwlockattr_destroy F
 GLIBC_2.38 pthread_rwlockattr_getpshared F
 GLIBC_2.38 pthread_rwlockattr_init F
@@ -2271,6 +2272,7 @@ GLIBC_2.42 pthread_mutex_setprioceiling F
 GLIBC_2.42 pthread_mutex_trylock F
 GLIBC_2.42 pthread_rwlock_tryrdlock F
 GLIBC_2.42 pthread_rwlock_trywrlock F
+GLIBC_2.42 pthread_rwlock_unlock F
 GLIBC_2.42 pthread_rwlockattr_destroy F
 GLIBC_2.42 pthread_rwlockattr_getpshared F
 GLIBC_2.42 pthread_rwlockattr_init F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist 
b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index b712a1b3bf..cd08c5f9c5 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -63,7 +63,6 @@ GLIBC_2.38 pthread_rwlock_init F
 GLIBC_2.38 pthread_rwlock_rdlock F
 GLIBC_2.38 pthread_rwlock_timedrdlock F
 GLIBC_2.38 pthread_rwlock_timedwrlock F
-GLIBC_2.38 pthread_rwlock_unlock F
 GLIBC_2.38 pthread_rwlock_wrlock F
 GLIBC_2.38 pthread_setconcurrency F
 GLIBC_2.38 pthread_setschedprio F
-- 
2.47.2


Reply via email to