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

Message-ID: <20250815181500.107433-2-gfle...@disroot.org>
---
 htl/Makefile                                | 2 +-
 htl/Versions                                | 6 +++++-
 sysdeps/htl/pt-setschedprio.c               | 9 ++++++++-
 sysdeps/htl/pthreadP.h                      | 3 +++
 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, 21 insertions(+), 5 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 82b7803c88..0f9e567faa 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -55,7 +55,6 @@ libpthread-routines := \
   pt-sigstate-init \
   pt-kill \
   pt-getcpuclockid \
-  pt-setschedprio \
   pt-yield \
   pt-getname-np \
   pt-setname-np \
@@ -204,6 +203,7 @@ routines := \
   pt-setcancelstate \
   pt-setcanceltype \
   pt-setschedparam \
+  pt-setschedprio \
   pt-setspecific \
   pt-sigmask \
   pt-sigstate \
diff --git a/htl/Versions b/htl/Versions
index 40ee2748a7..57041917aa 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -84,6 +84,7 @@ libc {
     pthread_rwlockattr_setpshared;
     pthread_setcancelstate;
     pthread_setcanceltype;
+    pthread_setschedprio;
     pthread_setspecific;
     pthread_sigmask;
   }
@@ -186,6 +187,10 @@ libc {
     pthread_setspecific;
   }
 
+  GLIBC_2.43 {
+    pthread_setschedprio;
+  }
+
   GLIBC_PRIVATE {
     __libc_alloca_cutoff;
     __libc_pthread_init;
@@ -276,7 +281,6 @@ libpthread {
     pthread_mutex_transfer_np;
 
     pthread_setconcurrency;
-    pthread_setschedprio;
 
     pthread_testcancel;
     pthread_yield;
diff --git a/sysdeps/htl/pt-setschedprio.c b/sysdeps/htl/pt-setschedprio.c
index 7e1429c48f..198fcc88b0 100644
--- a/sysdeps/htl/pt-setschedprio.c
+++ b/sysdeps/htl/pt-setschedprio.c
@@ -18,11 +18,18 @@
 
 #include <pthread.h>
 #include <pt-internal.h>
+#include <shlib-compat.h>
 
 int
-pthread_setschedprio (pthread_t thread, int prio)
+__pthread_setschedprio (pthread_t thread, int prio)
 {
   return ENOSYS;
 }
 
+libc_hidden_def (__pthread_setschedprio)
+versioned_symbol (libc, __pthread_setschedprio, pthread_setschedprio, 
GLIBC_2_43);
 stub_warning (pthread_setschedprio)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libc, __pthread_setschedprio, pthread_setschedprio, GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 535740f5ea..384e39d211 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -138,6 +138,9 @@ extern int __pthread_rwlockattr_setpshared 
(pthread_rwlockattr_t *__attr,
                                          int __pshared);
 libc_hidden_proto (__pthread_rwlockattr_setpshared)
 
+extern int __pthread_setschedprio (pthread_t __thr, int __prio);
+libc_hidden_proto (__pthread_setschedprio)
+
 extern int __pthread_cond_init (pthread_cond_t *cond,
                                const pthread_condattr_t *cond_attr);
 libc_hidden_proto (__pthread_cond_init)
diff --git a/sysdeps/mach/hurd/i386/libc.abilist 
b/sysdeps/mach/hurd/i386/libc.abilist
index aac3cb3319..5ba3b7f356 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -111,6 +111,7 @@ GLIBC_2.12 pthread_self F
 GLIBC_2.12 pthread_setcancelstate F
 GLIBC_2.12 pthread_setcanceltype F
 GLIBC_2.12 pthread_setschedparam F
+GLIBC_2.12 pthread_setschedprio F
 GLIBC_2.12 pthread_setspecific F
 GLIBC_2.12 pthread_sigmask F
 GLIBC_2.13 __fentry__ F
@@ -2633,6 +2634,7 @@ GLIBC_2.42 uabs F
 GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
+GLIBC_2.43 pthread_setschedprio F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist 
b/sysdeps/mach/hurd/i386/libpthread.abilist
index 9d2c4cd742..23df0ad6d1 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -31,7 +31,6 @@ GLIBC_2.12 pthread_join F
 GLIBC_2.12 pthread_kill F
 GLIBC_2.12 pthread_mutex_transfer_np F
 GLIBC_2.12 pthread_setconcurrency F
-GLIBC_2.12 pthread_setschedprio F
 GLIBC_2.12 pthread_spin_destroy F
 GLIBC_2.12 pthread_spin_init F
 GLIBC_2.12 pthread_spin_lock F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist 
b/sysdeps/mach/hurd/x86_64/libc.abilist
index 8f9d6aa842..06a85b5d40 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1603,6 +1603,7 @@ GLIBC_2.38 pthread_self F
 GLIBC_2.38 pthread_setcancelstate F
 GLIBC_2.38 pthread_setcanceltype F
 GLIBC_2.38 pthread_setschedparam F
+GLIBC_2.38 pthread_setschedprio F
 GLIBC_2.38 pthread_setspecific F
 GLIBC_2.38 pthread_sigmask F
 GLIBC_2.38 ptrace F
@@ -2315,6 +2316,7 @@ GLIBC_2.42 uabs F
 GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
+GLIBC_2.43 pthread_setschedprio F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
 HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist 
b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 81d355a94b..21555b7bd8 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -51,7 +51,6 @@ GLIBC_2.38 pthread_join F
 GLIBC_2.38 pthread_kill F
 GLIBC_2.38 pthread_mutex_transfer_np F
 GLIBC_2.38 pthread_setconcurrency F
-GLIBC_2.38 pthread_setschedprio F
 GLIBC_2.38 pthread_spin_destroy F
 GLIBC_2.38 pthread_spin_init F
 GLIBC_2.38 pthread_spin_lock F
-- 
2.47.2


Reply via email to