htl: move pthread_getattr_np into libc.

Message-ID: <20250815181500.107433-13-gfleury@disroot.org>
This commit is contained in:
gfleury 2025-08-15 20:14:53 +02:00 committed by Samuel Thibault
parent 6541288cb5
commit 1e6588e777
8 changed files with 18 additions and 7 deletions

View File

@ -26,7 +26,6 @@ LCLHDRS :=
libpthread-routines := \
pt-create \
pt-getattr \
pt-detach \
pt-exit \
pt-initialize \
@ -144,6 +143,7 @@ routines := \
pt-dealloc \
pt-destroy-specific \
pt-docancel \
pt-getattr \
pt-getconcurrency \
pt-getcpuclockid \
pt-getschedparam \

View File

@ -51,6 +51,7 @@ libc {
pthread_condattr_getpshared;
pthread_condattr_setclock;
pthread_condattr_setpshared;
pthread_getattr_np;
pthread_getconcurrency;
pthread_key_create;
pthread_key_delete;
@ -197,6 +198,7 @@ libc {
GLIBC_2.43 {
pthread_cancel;
pthread_getattr_np;
pthread_getconcurrency;
pthread_getcpuclockid;
pthread_kill;
@ -293,8 +295,6 @@ libpthread {
pthread_create; pthread_detach; pthread_exit;
pthread_getattr_np;
pthread_join;
pthread_mutex_transfer_np;
@ -341,7 +341,6 @@ libpthread {
__cthread_keycreate;
__cthread_getspecific;
__cthread_setspecific;
__pthread_getattr_np;
__pthread_enable_asynccancel;
__pthread_disable_asynccancel;
}

View File

@ -21,6 +21,8 @@
#include <pthread.h>
#include <pt-internal.h>
#include <shlib-compat.h>
#include <ldsodefs.h>
/* Initialize thread attribute *ATTR with attributes corresponding to the
already running thread THREAD. It shall be called on an uninitialized ATTR
@ -48,4 +50,9 @@ __pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
return 0;
}
weak_alias (__pthread_getattr_np, pthread_getattr_np)
libc_hidden_def (__pthread_getattr_np)
versioned_symbol (libc, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_43);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
compat_symbol (libpthread, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_12);
#endif

View File

@ -196,6 +196,7 @@ libc_hidden_proto (__pthread_key_delete)
int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void));
int __pthread_getattr_np (pthread_t, pthread_attr_t *);
libc_hidden_proto (__pthread_getattr_np)
int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr);
libc_hidden_proto (__pthread_attr_getstackaddr)

View File

@ -73,6 +73,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_getattr_np F
GLIBC_2.12 pthread_getconcurrency F
GLIBC_2.12 pthread_getcpuclockid F
GLIBC_2.12 pthread_getschedparam F
@ -2643,6 +2644,7 @@ GLIBC_2.42 uimaxabs F
GLIBC_2.42 ulabs F
GLIBC_2.42 ullabs F
GLIBC_2.43 pthread_cancel F
GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_kill F
@ -2715,6 +2717,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F
HURD_CTHREADS_0.3 __mutex_trylock F
HURD_CTHREADS_0.3 __mutex_unlock F
HURD_CTHREADS_0.3 __mutex_unlock_solid F
HURD_CTHREADS_0.3 __pthread_getattr_np F
HURD_CTHREADS_0.3 __spin_lock F
HURD_CTHREADS_0.3 __spin_lock_init F
HURD_CTHREADS_0.3 __spin_lock_solid F

View File

@ -22,7 +22,6 @@ GLIBC_2.12 pthread_atfork F
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_join F
GLIBC_2.12 pthread_mutex_transfer_np F
GLIBC_2.12 pthread_spin_destroy F

View File

@ -1556,6 +1556,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_getattr_np F
GLIBC_2.38 pthread_getconcurrency F
GLIBC_2.38 pthread_getcpuclockid F
GLIBC_2.38 pthread_getschedparam F
@ -2325,6 +2326,7 @@ GLIBC_2.42 uimaxabs F
GLIBC_2.42 ulabs F
GLIBC_2.42 ullabs F
GLIBC_2.43 pthread_cancel F
GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_kill F
@ -2341,6 +2343,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F
HURD_CTHREADS_0.3 __mutex_trylock F
HURD_CTHREADS_0.3 __mutex_unlock F
HURD_CTHREADS_0.3 __mutex_unlock_solid F
HURD_CTHREADS_0.3 __pthread_getattr_np F
HURD_CTHREADS_0.3 __spin_lock F
HURD_CTHREADS_0.3 __spin_lock_init F
HURD_CTHREADS_0.3 __spin_lock_solid F

View File

@ -40,7 +40,6 @@ GLIBC_2.38 pthread_clockjoin_np F
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_hurd_cond_timedwait_np F
GLIBC_2.38 pthread_hurd_cond_wait_np F
GLIBC_2.38 pthread_join F