]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: move pthread_get/setconcurrency into libc.
authorgfleury <gfleury@disroot.org>
Fri, 15 Aug 2025 18:14:43 +0000 (20:14 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 15 Aug 2025 23:12:21 +0000 (01:12 +0200)
Message-ID: <20250815181500.107433-3-gfleury@disroot.org>

htl/Makefile
htl/Versions
sysdeps/htl/pt-getconcurrency.c
sysdeps/htl/pt-setconcurrency.c
sysdeps/htl/pthreadP.h
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/mach/hurd/i386/libpthread.abilist
sysdeps/mach/hurd/x86_64/libc.abilist
sysdeps/mach/hurd/x86_64/libpthread.abilist

index 0f9e567faa9f01628ce7f4b265850d2e3dffdff9..f33c1dccf2d46e706d1331164d98e9794ef59c87 100644 (file)
@@ -45,8 +45,6 @@ libpthread-routines := \
   pt-thread-start \
   pt-thread-terminate \
   pt-startup \
-  pt-getconcurrency \
-  pt-setconcurrency \
   pt-docancel \
   pt-sysdep \
   pt-setup \
@@ -156,6 +154,7 @@ routines := \
   pt-condattr-setclock \
   pt-condattr-setpshared \
   pt-destroy-specific \
+  pt-getconcurrency \
   pt-getschedparam \
   pt-getspecific \
   pt-key-create \
@@ -202,6 +201,7 @@ routines := \
   pt-self pt-equal \
   pt-setcancelstate \
   pt-setcanceltype \
+  pt-setconcurrency \
   pt-setschedparam \
   pt-setschedprio \
   pt-setspecific \
index 57041917aaff4d85707319952345d44fa1cc2637..ad3628eb3ce1db1541fb62a21cf72a298e0e143e 100644 (file)
@@ -48,6 +48,7 @@ libc {
     pthread_condattr_getpshared;
     pthread_condattr_setclock;
     pthread_condattr_setpshared;
+    pthread_getconcurrency;
     pthread_key_create;
     pthread_key_delete;
     pthread_mutex_destroy;
@@ -84,6 +85,7 @@ libc {
     pthread_rwlockattr_setpshared;
     pthread_setcancelstate;
     pthread_setcanceltype;
+    pthread_setconcurrency;
     pthread_setschedprio;
     pthread_setspecific;
     pthread_sigmask;
@@ -188,6 +190,8 @@ libc {
   }
 
   GLIBC_2.43 {
+    pthread_getconcurrency;
+    pthread_setconcurrency;
     pthread_setschedprio;
   }
 
@@ -271,7 +275,7 @@ libpthread {
 
     pthread_getattr_np;
 
-    pthread_getconcurrency; pthread_getcpuclockid;
+    pthread_getcpuclockid;
 
     pthread_join;
 
@@ -280,8 +284,6 @@ libpthread {
 
     pthread_mutex_transfer_np;
 
-    pthread_setconcurrency;
-
     pthread_testcancel;
     pthread_yield;
 
index d43ef02ffef3eeec47960252f5267e8d8a47a33a..c20af5dbeb9cea90ebed96911137e69eb9f7b064 100644 (file)
 
 #include <pthread.h>
 #include <pt-internal.h>
+#include <shlib-compat.h>
 
 int
-pthread_getconcurrency (void)
+__pthread_getconcurrency (void)
 {
   return __pthread_concurrency;
 }
+libc_hidden_def (__pthread_getconcurrency)
+versioned_symbol (libc, __pthread_getconcurrency, pthread_getconcurrency, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libc, __pthread_getconcurrency, pthread_getconcurrency, GLIBC_2_12);
+#endif
index 7b4b6f7b2dfa6cdfa8e41ba31ebaae4554e18884..484e0f8532aa8ad247d4305016f6fc9a98cc793d 100644 (file)
 
 #include <pthread.h>
 #include <pt-internal.h>
+#include <shlib-compat.h>
 
 int __pthread_concurrency;
 
 int
-pthread_setconcurrency (int new_level)
+__pthread_setconcurrency (int new_level)
 {
   if (new_level < 0)
     return EINVAL;
@@ -31,3 +32,9 @@ pthread_setconcurrency (int new_level)
 
   return 0;
 }
+libc_hidden_def (__pthread_setconcurrency)
+versioned_symbol (libc, __pthread_setconcurrency, pthread_setconcurrency, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libc, __pthread_setconcurrency, pthread_setconcurrency, GLIBC_2_12);
+#endif
index 384e39d2118f95b20bd5e899eec919c6172c6045..5dea8bd172938ad7b532ee189b01dbc4dd8c098f 100644 (file)
@@ -213,6 +213,10 @@ libc_hidden_proto (__pthread_attr_getstack)
 void __pthread_testcancel (void);
 int __pthread_attr_init (pthread_attr_t *attr);
 int __pthread_condattr_init (pthread_condattr_t *attr);
+int __pthread_setconcurrency (int __new_level);
+libc_hidden_proto (__pthread_setconcurrency)
+int __pthread_getconcurrency (void);
+libc_hidden_proto (__pthread_getconcurrency)
 
 #define __pthread_raise_internal(__sig) raise (__sig)
 
index 5ba3b7f356a8201df55abbb7679e84c1ed1732bc..90faf894958863aaff5ee51ff0fb66bb9eb2cb62 100644 (file)
@@ -71,6 +71,7 @@ GLIBC_2.12 pthread_condattr_init F
 GLIBC_2.12 pthread_condattr_setclock F
 GLIBC_2.12 pthread_condattr_setpshared F
 GLIBC_2.12 pthread_equal F
+GLIBC_2.12 pthread_getconcurrency F
 GLIBC_2.12 pthread_getschedparam F
 GLIBC_2.12 pthread_getspecific F
 GLIBC_2.12 pthread_key_create F
@@ -110,6 +111,7 @@ GLIBC_2.12 pthread_rwlockattr_setpshared F
 GLIBC_2.12 pthread_self F
 GLIBC_2.12 pthread_setcancelstate F
 GLIBC_2.12 pthread_setcanceltype F
+GLIBC_2.12 pthread_setconcurrency F
 GLIBC_2.12 pthread_setschedparam F
 GLIBC_2.12 pthread_setschedprio F
 GLIBC_2.12 pthread_setspecific F
@@ -2634,6 +2636,8 @@ GLIBC_2.42 uabs F
 GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
+GLIBC_2.43 pthread_getconcurrency F
+GLIBC_2.43 pthread_setconcurrency F
 GLIBC_2.43 pthread_setschedprio F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
index 23df0ad6d190cb9119c228d4bf20db047beb1c98..58e46f4e7a2ff9930731800de4b8221a045c3320 100644 (file)
@@ -25,12 +25,10 @@ GLIBC_2.12 pthread_create F
 GLIBC_2.12 pthread_detach F
 GLIBC_2.12 pthread_exit F
 GLIBC_2.12 pthread_getattr_np F
-GLIBC_2.12 pthread_getconcurrency F
 GLIBC_2.12 pthread_getcpuclockid F
 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_spin_destroy F
 GLIBC_2.12 pthread_spin_init F
 GLIBC_2.12 pthread_spin_lock F
index 06a85b5d4001be7df608f3fb87109a31bcc1037e..1d87ec1a8d68f72e3bb3f45cbeee90d0e125a4b3 100644 (file)
@@ -1554,6 +1554,7 @@ GLIBC_2.38 pthread_condattr_setclock F
 GLIBC_2.38 pthread_condattr_setpshared F
 GLIBC_2.38 pthread_equal F
 GLIBC_2.38 pthread_exit F
+GLIBC_2.38 pthread_getconcurrency F
 GLIBC_2.38 pthread_getschedparam F
 GLIBC_2.38 pthread_getspecific F
 GLIBC_2.38 pthread_key_create F
@@ -1602,6 +1603,7 @@ GLIBC_2.38 pthread_rwlockattr_setpshared F
 GLIBC_2.38 pthread_self F
 GLIBC_2.38 pthread_setcancelstate F
 GLIBC_2.38 pthread_setcanceltype F
+GLIBC_2.38 pthread_setconcurrency F
 GLIBC_2.38 pthread_setschedparam F
 GLIBC_2.38 pthread_setschedprio F
 GLIBC_2.38 pthread_setspecific F
@@ -2316,6 +2318,8 @@ GLIBC_2.42 uabs F
 GLIBC_2.42 uimaxabs F
 GLIBC_2.42 ulabs F
 GLIBC_2.42 ullabs F
+GLIBC_2.43 pthread_getconcurrency F
+GLIBC_2.43 pthread_setconcurrency F
 GLIBC_2.43 pthread_setschedprio F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
index 21555b7bd8618eb6218ce1823461af3b73e805df..b40dda87c2ef00a140a3edd9055048d5673a570d 100644 (file)
@@ -43,14 +43,12 @@ GLIBC_2.38 pthread_create F
 GLIBC_2.38 pthread_detach F
 GLIBC_2.38 pthread_exit F
 GLIBC_2.38 pthread_getattr_np F
-GLIBC_2.38 pthread_getconcurrency F
 GLIBC_2.38 pthread_getcpuclockid F
 GLIBC_2.38 pthread_hurd_cond_timedwait_np F
 GLIBC_2.38 pthread_hurd_cond_wait_np F
 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_spin_destroy F
 GLIBC_2.38 pthread_spin_init F
 GLIBC_2.38 pthread_spin_lock F