aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-15 20:14:53 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-16 01:44:51 +0200
commit1e6588e777e4a07f68575f51ffcb1c84d9c73f50 (patch)
treea9e1f354b9e2db94390e071766245e3a27af5530
parent6541288cb58d297be144cde4188ab41aecadc213 (diff)
downloadglibc-1e6588e777e4a07f68575f51ffcb1c84d9c73f50.zip
glibc-1e6588e777e4a07f68575f51ffcb1c84d9c73f50.tar.gz
glibc-1e6588e777e4a07f68575f51ffcb1c84d9c73f50.tar.bz2
htl: move pthread_getattr_np into libc.
Message-ID: <20250815181500.107433-13-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions5
-rw-r--r--htl/pt-getattr.c9
-rw-r--r--sysdeps/htl/pthreadP.h1
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist3
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist3
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist1
8 files changed, 18 insertions, 7 deletions
diff --git a/htl/Makefile b/htl/Makefile
index ecfa3c1..64e484c 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -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 \
diff --git a/htl/Versions b/htl/Versions
index 0f22745..c94bd61 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -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;
}
diff --git a/htl/pt-getattr.c b/htl/pt-getattr.c
index a851514..74b86ca 100644
--- a/htl/pt-getattr.c
+++ b/htl/pt-getattr.c
@@ -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
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index dd9d777..0deea22 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -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)
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index a676cd0..0cbff57 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 044fb1c..3d22516 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index dff8eee..2b983e4 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 66f06f8..cf45150 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -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