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

Message-ID: <20250103103750.870897-4-gfle...@disroot.org>
---
 htl/Makefile                                    |  4 ++--
 htl/Versions                                    |  7 +++++--
 sysdeps/htl/pthreadP.h                          |  6 ++++++
 sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c | 10 ++++++++--
 sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c | 10 ++++++++--
 sysdeps/mach/hurd/i386/libc.abilist             |  4 ++++
 sysdeps/mach/hurd/i386/libpthread.abilist       |  2 --
 sysdeps/mach/hurd/x86_64/libc.abilist           |  4 ++++
 sysdeps/mach/hurd/x86_64/libpthread.abilist     |  2 --
 9 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 0d3e78dee5..f7e12983d2 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -56,8 +56,6 @@ libpthread-routines := \
   pt-cancel \
   pt-mutex-destroy \
   pt-mutex-transfer-np \
-  pt-mutex-getprioceiling \
-  pt-mutex-setprioceiling \
   pt-mutex-consistent \
   pt-rwlock-attr \
   pt-rwlockattr-init \
@@ -184,8 +182,10 @@ routines := \
   pt-condattr-setpshared \
   pt-getschedparam \
   pt-mutex-checklocked \
+  pt-mutex-getprioceiling \
   pt-mutex-init \
   pt-mutex-lock \
+  pt-mutex-setprioceiling \
   pt-mutex-timedlock \
   pt-mutex-trylock \
   pt-mutex-unlock \
diff --git a/htl/Versions b/htl/Versions
index 757cefef61..9c016bc6cf 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -38,8 +38,10 @@ libc {
     pthread_condattr_getpshared;
     pthread_condattr_setclock;
     pthread_condattr_setpshared;
+    pthread_mutex_getprioceiling;
     pthread_mutex_init;
     pthread_mutex_lock;
+    pthread_mutex_setprioceiling;
     pthread_mutex_timedlock;
     pthread_mutex_trylock;
     pthread_mutex_unlock;
@@ -117,6 +119,8 @@ libc {
   }
 
   GLIBC_2.42 {
+    pthread_mutex_getprioceiling;
+    pthread_mutex_setprioceiling;
     pthread_mutex_trylock;
   }
 
@@ -210,8 +214,7 @@ libpthread {
     pthread_kill;
     __pthread_kill;
 
-    pthread_mutex_destroy; pthread_mutex_getprioceiling;
-    pthread_mutex_setprioceiling;
+    pthread_mutex_destroy;
     pthread_mutex_transfer_np;
 
     pthread_once;
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index a2a0a932b7..e41cb4c85d 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -39,6 +39,12 @@ libc_hidden_proto (__pthread_mutex_clocklock)
 extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
 libc_hidden_proto (__pthread_mutex_lock)
+extern int __pthread_mutex_getprioceiling (const pthread_mutex_t *__mutex,
+                                        int *__prioceiling);
+libc_hidden_proto (__pthread_mutex_getprioceiling)
+extern int __pthread_mutex_setprioceiling (pthread_mutex_t *__mutex,
+                                        int __prio, int *__oldprio);
+libc_hidden_proto (__pthread_mutex_setprioceiling)
 extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
 libc_hidden_proto (__pthread_mutex_trylock)
 extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c 
b/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c
index 7a8feadce7..27ea03ee60 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c
@@ -16,19 +16,25 @@
    License along with the GNU C Library;  if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <pthread.h>
+#include <pthreadP.h>
 #include <stdlib.h>
 #include <assert.h>
 #include <pt-internal.h>
 #include "pt-mutex.h"
 #include <hurdlock.h>
+#include <shlib-compat.h>
 
 int
-pthread_mutex_getprioceiling (const pthread_mutex_t *mtxp, int *clp)
+__pthread_mutex_getprioceiling (const pthread_mutex_t *mtxp, int *clp)
 {
   (void) mtxp;
   (void) clp;
   return ENOSYS;
 }
+libc_hidden_def (__pthread_mutex_getprioceiling)
+versioned_symbol (libc, __pthread_mutex_getprioceiling, 
pthread_mutex_getprioceiling, GLIBC_2_42);
 
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, 
__pthread_mutex_getprioceiling,pthread_mutex_getprioceiling, GLIBC_2_12);
+#endif
 stub_warning (pthread_mutex_getprioceiling)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c 
b/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c
index 6ccce83340..5064e2f575 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c
@@ -16,20 +16,26 @@
    License along with the GNU C Library;  if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <pthread.h>
+#include <pthreadP.h>
 #include <stdlib.h>
 #include <assert.h>
 #include <pt-internal.h>
 #include "pt-mutex.h"
 #include <hurdlock.h>
+#include <shlib-compat.h>
 
 int
-pthread_mutex_setprioceiling (pthread_mutex_t *mtxp, int cl, int *prp)
+__pthread_mutex_setprioceiling (pthread_mutex_t *mtxp, int cl, int *prp)
 {
   (void) mtxp;
   (void) cl;
   (void) prp;
   return ENOSYS;
 }
+libc_hidden_def (__pthread_mutex_setprioceiling)
+versioned_symbol (libc, __pthread_mutex_setprioceiling, 
pthread_mutex_setprioceiling, GLIBC_2_42);
 
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, 
__pthread_mutex_setprioceiling,pthread_mutex_setprioceiling, GLIBC_2_12);
+#endif
 stub_warning (pthread_mutex_setprioceiling)
diff --git a/sysdeps/mach/hurd/i386/libc.abilist 
b/sysdeps/mach/hurd/i386/libc.abilist
index aba93a281b..c980b46bca 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -63,8 +63,10 @@ GLIBC_2.12 pthread_condattr_setclock F
 GLIBC_2.12 pthread_condattr_setpshared F
 GLIBC_2.12 pthread_equal F
 GLIBC_2.12 pthread_getschedparam F
+GLIBC_2.12 pthread_mutex_getprioceiling F
 GLIBC_2.12 pthread_mutex_init F
 GLIBC_2.12 pthread_mutex_lock F
+GLIBC_2.12 pthread_mutex_setprioceiling F
 GLIBC_2.12 pthread_mutex_timedlock F
 GLIBC_2.12 pthread_mutex_trylock F
 GLIBC_2.12 pthread_mutex_unlock F
@@ -2554,6 +2556,8 @@ 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_mutex_getprioceiling F
+GLIBC_2.42 pthread_mutex_setprioceiling F
 GLIBC_2.42 pthread_mutex_trylock F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist 
b/sysdeps/mach/hurd/i386/libpthread.abilist
index 8c53b8d0ee..0eb452eb02 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -42,8 +42,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_destroy F
-GLIBC_2.12 pthread_mutex_getprioceiling F
-GLIBC_2.12 pthread_mutex_setprioceiling F
 GLIBC_2.12 pthread_mutex_transfer_np F
 GLIBC_2.12 pthread_once F
 GLIBC_2.12 pthread_rwlock_destroy F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index 2251371451..bdb89fb41d 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1549,8 +1549,10 @@ GLIBC_2.38 pthread_exit F
 GLIBC_2.38 pthread_getschedparam F
 GLIBC_2.38 pthread_mutex_clocklock F
 GLIBC_2.38 pthread_mutex_destroy F
+GLIBC_2.38 pthread_mutex_getprioceiling F
 GLIBC_2.38 pthread_mutex_init F
 GLIBC_2.38 pthread_mutex_lock F
+GLIBC_2.38 pthread_mutex_setprioceiling F
 GLIBC_2.38 pthread_mutex_timedlock F
 GLIBC_2.38 pthread_mutex_trylock F
 GLIBC_2.38 pthread_mutex_unlock F
@@ -2240,6 +2242,8 @@ 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_mutex_getprioceiling F
+GLIBC_2.42 pthread_mutex_setprioceiling F
 GLIBC_2.42 pthread_mutex_trylock F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist 
b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index bd5e12adcc..faeac21d94 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -64,8 +64,6 @@ GLIBC_2.38 pthread_kill F
 GLIBC_2.38 pthread_mutex_consistent F
 GLIBC_2.38 pthread_mutex_consistent_np F
 GLIBC_2.38 pthread_mutex_destroy F
-GLIBC_2.38 pthread_mutex_getprioceiling F
-GLIBC_2.38 pthread_mutex_setprioceiling F
 GLIBC_2.38 pthread_mutex_transfer_np F
 GLIBC_2.38 pthread_once F
 GLIBC_2.38 pthread_rwlock_clockrdlock F
-- 
2.45.2


Reply via email to