mirror of git://sourceware.org/git/glibc.git
htl: move pthread_get/setconcurrency into libc.
Message-ID: <20250815181500.107433-3-gfleury@disroot.org>
This commit is contained in:
parent
d479e71498
commit
b586357e2a
|
|
@ -45,8 +45,6 @@ libpthread-routines := \
|
||||||
pt-thread-start \
|
pt-thread-start \
|
||||||
pt-thread-terminate \
|
pt-thread-terminate \
|
||||||
pt-startup \
|
pt-startup \
|
||||||
pt-getconcurrency \
|
|
||||||
pt-setconcurrency \
|
|
||||||
pt-docancel \
|
pt-docancel \
|
||||||
pt-sysdep \
|
pt-sysdep \
|
||||||
pt-setup \
|
pt-setup \
|
||||||
|
|
@ -156,6 +154,7 @@ routines := \
|
||||||
pt-condattr-setclock \
|
pt-condattr-setclock \
|
||||||
pt-condattr-setpshared \
|
pt-condattr-setpshared \
|
||||||
pt-destroy-specific \
|
pt-destroy-specific \
|
||||||
|
pt-getconcurrency \
|
||||||
pt-getschedparam \
|
pt-getschedparam \
|
||||||
pt-getspecific \
|
pt-getspecific \
|
||||||
pt-key-create \
|
pt-key-create \
|
||||||
|
|
@ -202,6 +201,7 @@ routines := \
|
||||||
pt-self pt-equal \
|
pt-self pt-equal \
|
||||||
pt-setcancelstate \
|
pt-setcancelstate \
|
||||||
pt-setcanceltype \
|
pt-setcanceltype \
|
||||||
|
pt-setconcurrency \
|
||||||
pt-setschedparam \
|
pt-setschedparam \
|
||||||
pt-setschedprio \
|
pt-setschedprio \
|
||||||
pt-setspecific \
|
pt-setspecific \
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ libc {
|
||||||
pthread_condattr_getpshared;
|
pthread_condattr_getpshared;
|
||||||
pthread_condattr_setclock;
|
pthread_condattr_setclock;
|
||||||
pthread_condattr_setpshared;
|
pthread_condattr_setpshared;
|
||||||
|
pthread_getconcurrency;
|
||||||
pthread_key_create;
|
pthread_key_create;
|
||||||
pthread_key_delete;
|
pthread_key_delete;
|
||||||
pthread_mutex_destroy;
|
pthread_mutex_destroy;
|
||||||
|
|
@ -84,6 +85,7 @@ libc {
|
||||||
pthread_rwlockattr_setpshared;
|
pthread_rwlockattr_setpshared;
|
||||||
pthread_setcancelstate;
|
pthread_setcancelstate;
|
||||||
pthread_setcanceltype;
|
pthread_setcanceltype;
|
||||||
|
pthread_setconcurrency;
|
||||||
pthread_setschedprio;
|
pthread_setschedprio;
|
||||||
pthread_setspecific;
|
pthread_setspecific;
|
||||||
pthread_sigmask;
|
pthread_sigmask;
|
||||||
|
|
@ -188,6 +190,8 @@ libc {
|
||||||
}
|
}
|
||||||
|
|
||||||
GLIBC_2.43 {
|
GLIBC_2.43 {
|
||||||
|
pthread_getconcurrency;
|
||||||
|
pthread_setconcurrency;
|
||||||
pthread_setschedprio;
|
pthread_setschedprio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -271,7 +275,7 @@ libpthread {
|
||||||
|
|
||||||
pthread_getattr_np;
|
pthread_getattr_np;
|
||||||
|
|
||||||
pthread_getconcurrency; pthread_getcpuclockid;
|
pthread_getcpuclockid;
|
||||||
|
|
||||||
pthread_join;
|
pthread_join;
|
||||||
|
|
||||||
|
|
@ -280,8 +284,6 @@ libpthread {
|
||||||
|
|
||||||
pthread_mutex_transfer_np;
|
pthread_mutex_transfer_np;
|
||||||
|
|
||||||
pthread_setconcurrency;
|
|
||||||
|
|
||||||
pthread_testcancel;
|
pthread_testcancel;
|
||||||
pthread_yield;
|
pthread_yield;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,16 @@
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <pt-internal.h>
|
#include <pt-internal.h>
|
||||||
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
pthread_getconcurrency (void)
|
__pthread_getconcurrency (void)
|
||||||
{
|
{
|
||||||
return __pthread_concurrency;
|
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
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,12 @@
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <pt-internal.h>
|
#include <pt-internal.h>
|
||||||
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
int __pthread_concurrency;
|
int __pthread_concurrency;
|
||||||
|
|
||||||
int
|
int
|
||||||
pthread_setconcurrency (int new_level)
|
__pthread_setconcurrency (int new_level)
|
||||||
{
|
{
|
||||||
if (new_level < 0)
|
if (new_level < 0)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
@ -31,3 +32,9 @@ pthread_setconcurrency (int new_level)
|
||||||
|
|
||||||
return 0;
|
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
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,10 @@ libc_hidden_proto (__pthread_attr_getstack)
|
||||||
void __pthread_testcancel (void);
|
void __pthread_testcancel (void);
|
||||||
int __pthread_attr_init (pthread_attr_t *attr);
|
int __pthread_attr_init (pthread_attr_t *attr);
|
||||||
int __pthread_condattr_init (pthread_condattr_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)
|
#define __pthread_raise_internal(__sig) raise (__sig)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ GLIBC_2.12 pthread_condattr_init F
|
||||||
GLIBC_2.12 pthread_condattr_setclock F
|
GLIBC_2.12 pthread_condattr_setclock F
|
||||||
GLIBC_2.12 pthread_condattr_setpshared F
|
GLIBC_2.12 pthread_condattr_setpshared F
|
||||||
GLIBC_2.12 pthread_equal F
|
GLIBC_2.12 pthread_equal F
|
||||||
|
GLIBC_2.12 pthread_getconcurrency F
|
||||||
GLIBC_2.12 pthread_getschedparam F
|
GLIBC_2.12 pthread_getschedparam F
|
||||||
GLIBC_2.12 pthread_getspecific F
|
GLIBC_2.12 pthread_getspecific F
|
||||||
GLIBC_2.12 pthread_key_create 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_self F
|
||||||
GLIBC_2.12 pthread_setcancelstate F
|
GLIBC_2.12 pthread_setcancelstate F
|
||||||
GLIBC_2.12 pthread_setcanceltype F
|
GLIBC_2.12 pthread_setcanceltype F
|
||||||
|
GLIBC_2.12 pthread_setconcurrency F
|
||||||
GLIBC_2.12 pthread_setschedparam F
|
GLIBC_2.12 pthread_setschedparam F
|
||||||
GLIBC_2.12 pthread_setschedprio F
|
GLIBC_2.12 pthread_setschedprio F
|
||||||
GLIBC_2.12 pthread_setspecific F
|
GLIBC_2.12 pthread_setspecific F
|
||||||
|
|
@ -2634,6 +2636,8 @@ GLIBC_2.42 uabs F
|
||||||
GLIBC_2.42 uimaxabs F
|
GLIBC_2.42 uimaxabs F
|
||||||
GLIBC_2.42 ulabs F
|
GLIBC_2.42 ulabs F
|
||||||
GLIBC_2.42 ullabs 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.43 pthread_setschedprio F
|
||||||
GLIBC_2.5 __readlinkat_chk F
|
GLIBC_2.5 __readlinkat_chk F
|
||||||
GLIBC_2.5 inet6_opt_append F
|
GLIBC_2.5 inet6_opt_append F
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,10 @@ GLIBC_2.12 pthread_create F
|
||||||
GLIBC_2.12 pthread_detach F
|
GLIBC_2.12 pthread_detach F
|
||||||
GLIBC_2.12 pthread_exit F
|
GLIBC_2.12 pthread_exit F
|
||||||
GLIBC_2.12 pthread_getattr_np F
|
GLIBC_2.12 pthread_getattr_np F
|
||||||
GLIBC_2.12 pthread_getconcurrency F
|
|
||||||
GLIBC_2.12 pthread_getcpuclockid F
|
GLIBC_2.12 pthread_getcpuclockid F
|
||||||
GLIBC_2.12 pthread_join F
|
GLIBC_2.12 pthread_join F
|
||||||
GLIBC_2.12 pthread_kill F
|
GLIBC_2.12 pthread_kill F
|
||||||
GLIBC_2.12 pthread_mutex_transfer_np 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_destroy F
|
||||||
GLIBC_2.12 pthread_spin_init F
|
GLIBC_2.12 pthread_spin_init F
|
||||||
GLIBC_2.12 pthread_spin_lock F
|
GLIBC_2.12 pthread_spin_lock F
|
||||||
|
|
|
||||||
|
|
@ -1554,6 +1554,7 @@ GLIBC_2.38 pthread_condattr_setclock F
|
||||||
GLIBC_2.38 pthread_condattr_setpshared F
|
GLIBC_2.38 pthread_condattr_setpshared F
|
||||||
GLIBC_2.38 pthread_equal F
|
GLIBC_2.38 pthread_equal F
|
||||||
GLIBC_2.38 pthread_exit F
|
GLIBC_2.38 pthread_exit F
|
||||||
|
GLIBC_2.38 pthread_getconcurrency F
|
||||||
GLIBC_2.38 pthread_getschedparam F
|
GLIBC_2.38 pthread_getschedparam F
|
||||||
GLIBC_2.38 pthread_getspecific F
|
GLIBC_2.38 pthread_getspecific F
|
||||||
GLIBC_2.38 pthread_key_create 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_self F
|
||||||
GLIBC_2.38 pthread_setcancelstate F
|
GLIBC_2.38 pthread_setcancelstate F
|
||||||
GLIBC_2.38 pthread_setcanceltype F
|
GLIBC_2.38 pthread_setcanceltype F
|
||||||
|
GLIBC_2.38 pthread_setconcurrency F
|
||||||
GLIBC_2.38 pthread_setschedparam F
|
GLIBC_2.38 pthread_setschedparam F
|
||||||
GLIBC_2.38 pthread_setschedprio F
|
GLIBC_2.38 pthread_setschedprio F
|
||||||
GLIBC_2.38 pthread_setspecific F
|
GLIBC_2.38 pthread_setspecific F
|
||||||
|
|
@ -2316,6 +2318,8 @@ GLIBC_2.42 uabs F
|
||||||
GLIBC_2.42 uimaxabs F
|
GLIBC_2.42 uimaxabs F
|
||||||
GLIBC_2.42 ulabs F
|
GLIBC_2.42 ulabs F
|
||||||
GLIBC_2.42 ullabs 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.43 pthread_setschedprio F
|
||||||
HURD_CTHREADS_0.3 __cthread_getspecific F
|
HURD_CTHREADS_0.3 __cthread_getspecific F
|
||||||
HURD_CTHREADS_0.3 __cthread_keycreate F
|
HURD_CTHREADS_0.3 __cthread_keycreate F
|
||||||
|
|
|
||||||
|
|
@ -43,14 +43,12 @@ GLIBC_2.38 pthread_create F
|
||||||
GLIBC_2.38 pthread_detach F
|
GLIBC_2.38 pthread_detach F
|
||||||
GLIBC_2.38 pthread_exit F
|
GLIBC_2.38 pthread_exit F
|
||||||
GLIBC_2.38 pthread_getattr_np F
|
GLIBC_2.38 pthread_getattr_np F
|
||||||
GLIBC_2.38 pthread_getconcurrency F
|
|
||||||
GLIBC_2.38 pthread_getcpuclockid F
|
GLIBC_2.38 pthread_getcpuclockid F
|
||||||
GLIBC_2.38 pthread_hurd_cond_timedwait_np F
|
GLIBC_2.38 pthread_hurd_cond_timedwait_np F
|
||||||
GLIBC_2.38 pthread_hurd_cond_wait_np F
|
GLIBC_2.38 pthread_hurd_cond_wait_np F
|
||||||
GLIBC_2.38 pthread_join F
|
GLIBC_2.38 pthread_join F
|
||||||
GLIBC_2.38 pthread_kill F
|
GLIBC_2.38 pthread_kill F
|
||||||
GLIBC_2.38 pthread_mutex_transfer_np 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_destroy F
|
||||||
GLIBC_2.38 pthread_spin_init F
|
GLIBC_2.38 pthread_spin_init F
|
||||||
GLIBC_2.38 pthread_spin_lock F
|
GLIBC_2.38 pthread_spin_lock F
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue