summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-11-18 14:50:43 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-11-18 15:01:35 +0100
commitbb3524a879fdcaa3588d811ab6494c04fce75a76 (patch)
treede4606bc393bd9ef47c8176c617b1f62b2c7aaef /sysdeps
parent77f446346a678f54cf10945d159ccdd2869769a2 (diff)
htl: move pthread_getname_np/setname_np into libc.
Message-ID: <20251118125044.1160780-2-gfleury@disroot.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/pthreadP.h5
-rw-r--r--sysdeps/mach/htl/pt-getname-np.c10
-rw-r--r--sysdeps/mach/htl/pt-setname-np.c9
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist4
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist2
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist4
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist2
7 files changed, 30 insertions, 6 deletions
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 5fb6469714..6ea1e79a92 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -225,6 +225,11 @@ int __pthread_setconcurrency (int __new_level);
libc_hidden_proto (__pthread_setconcurrency)
int __pthread_getconcurrency (void);
libc_hidden_proto (__pthread_getconcurrency)
+int __pthread_getname_np (pthread_t __target_thread, char *__buf,
+ size_t __buflen);
+libc_hidden_proto (__pthread_getname_np)
+int __pthread_setname_np (pthread_t __target_thread, const char *__name);
+libc_hidden_proto (__pthread_setname_np)
#define __pthread_raise_internal(__sig) raise (__sig)
diff --git a/sysdeps/mach/htl/pt-getname-np.c b/sysdeps/mach/htl/pt-getname-np.c
index 7b836b667a..8db4d40693 100644
--- a/sysdeps/mach/htl/pt-getname-np.c
+++ b/sysdeps/mach/htl/pt-getname-np.c
@@ -23,6 +23,9 @@
#include <string.h>
#include <pt-internal.h>
+#include <string.h>
+#include <shlib-compat.h>
+#include <ldsodefs.h>
int
__pthread_getname_np (pthread_t thread, char *buf, size_t len)
@@ -64,4 +67,9 @@ __pthread_getname_np (pthread_t thread, char *buf, size_t len)
#endif
}
-weak_alias (__pthread_getname_np, pthread_getname_np)
+libc_hidden_def (__pthread_getname_np)
+versioned_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43)
+compat_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_40);
+#endif
diff --git a/sysdeps/mach/htl/pt-setname-np.c b/sysdeps/mach/htl/pt-setname-np.c
index 58400c1edf..0a2a8df5cf 100644
--- a/sysdeps/mach/htl/pt-setname-np.c
+++ b/sysdeps/mach/htl/pt-setname-np.c
@@ -22,6 +22,8 @@
#include <string.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
+#include <ldsodefs.h>
int
__pthread_setname_np (pthread_t thread, const char *name)
@@ -49,4 +51,9 @@ __pthread_setname_np (pthread_t thread, const char *name)
#endif
}
-weak_alias (__pthread_setname_np, pthread_setname_np)
+libc_hidden_def (__pthread_setname_np)
+versioned_symbol (libc, __pthread_setname_np, pthread_setname_np, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43)
+compat_symbol (libpthread, __pthread_setname_np, pthread_setname_np, GLIBC_2_40);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index f7c323c834..a01535746f 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2598,6 +2598,8 @@ GLIBC_2.4 readlinkat F
GLIBC_2.4 renameat F
GLIBC_2.4 symlinkat F
GLIBC_2.4 unlinkat F
+GLIBC_2.40 pthread_getname_np F
+GLIBC_2.40 pthread_setname_np F
GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F
@@ -2676,10 +2678,12 @@ GLIBC_2.43 pthread_detach F
GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
+GLIBC_2.43 pthread_getname_np F
GLIBC_2.43 pthread_join F
GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_mutex_transfer_np F
GLIBC_2.43 pthread_setconcurrency F
+GLIBC_2.43 pthread_setname_np F
GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_timedjoin_np F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index e1844a8f5e..318aa1a690 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -33,5 +33,3 @@ GLIBC_2.32 tss_create F
GLIBC_2.32 tss_delete F
GLIBC_2.32 tss_get F
GLIBC_2.32 tss_set F
-GLIBC_2.40 pthread_getname_np F
-GLIBC_2.40 pthread_setname_np F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index b482d2d040..38261ba339 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -2276,6 +2276,8 @@ GLIBC_2.39 stdc_trailing_zeros_ui F
GLIBC_2.39 stdc_trailing_zeros_ul F
GLIBC_2.39 stdc_trailing_zeros_ull F
GLIBC_2.39 stdc_trailing_zeros_us F
+GLIBC_2.40 pthread_getname_np F
+GLIBC_2.40 pthread_setname_np F
GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F
@@ -2354,10 +2356,12 @@ GLIBC_2.43 pthread_detach F
GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
+GLIBC_2.43 pthread_getname_np F
GLIBC_2.43 pthread_join F
GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_mutex_transfer_np F
GLIBC_2.43 pthread_setconcurrency F
+GLIBC_2.43 pthread_setname_np F
GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_timedjoin_np F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index d4ae93df53..c9ad949d65 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -32,5 +32,3 @@ GLIBC_2.38 tss_create F
GLIBC_2.38 tss_delete F
GLIBC_2.38 tss_get F
GLIBC_2.38 tss_set F
-GLIBC_2.40 pthread_getname_np F
-GLIBC_2.40 pthread_setname_np F