aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-08-15 20:14:48 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-08-16 01:44:27 +0200
commit2dcb8fb8e770d873501e48a060fb59fb2fcc62c1 (patch)
treea1054a7a33f5c8786eaaf92e8aa23f754b64c244
parentfa35ccbba87a55d1c5a046bfd85e714a7c7c8f7f (diff)
downloadglibc-2dcb8fb8e770d873501e48a060fb59fb2fcc62c1.zip
glibc-2dcb8fb8e770d873501e48a060fb59fb2fcc62c1.tar.gz
glibc-2dcb8fb8e770d873501e48a060fb59fb2fcc62c1.tar.bz2
htl: move pthread_yield into libc.
Message-ID: <20250815181500.107433-8-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions3
-rw-r--r--htl/pt-yield.c9
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist2
-rw-r--r--sysdeps/mach/hurd/x86_64/libpthread.abilist1
7 files changed, 15 insertions, 5 deletions
diff --git a/htl/Makefile b/htl/Makefile
index be7db0a..6c04a27 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -45,7 +45,6 @@ libpthread-routines := \
pt-spin \
pt-sigstate-init \
pt-kill \
- pt-yield \
pt-getname-np \
pt-setname-np \
sem_close \
@@ -211,6 +210,7 @@ routines := \
pt-timedblock \
pt-timedblock-intr \
pt-wakeup \
+ pt-yield \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 68c7f01..e6bd128 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -90,6 +90,7 @@ libc {
pthread_setschedprio;
pthread_setspecific;
pthread_sigmask;
+ pthread_yield;
}
GLIBC_2.21 {
@@ -195,6 +196,7 @@ libc {
pthread_getcpuclockid;
pthread_setconcurrency;
pthread_setschedprio;
+ pthread_yield;
}
GLIBC_PRIVATE {
@@ -294,7 +296,6 @@ libpthread {
pthread_mutex_transfer_np;
pthread_testcancel;
- pthread_yield;
sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post;
sem_timedwait; sem_trywait; sem_unlink; sem_wait;
diff --git a/htl/pt-yield.c b/htl/pt-yield.c
index 0cab615..f9f0b63 100644
--- a/htl/pt-yield.c
+++ b/htl/pt-yield.c
@@ -18,9 +18,16 @@
#include <pthread.h>
#include <sched.h>
+#include <shlib-compat.h>
+
int
-pthread_yield (void)
+__pthread_yield (void)
{
return __sched_yield ();
}
+versioned_symbol (libc, __pthread_yield, pthread_yield, GLIBC_2_43);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
+compat_symbol (libpthread, __pthread_yield, pthread_yield, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 791920f..20cff5f 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -117,6 +117,7 @@ GLIBC_2.12 pthread_setschedparam F
GLIBC_2.12 pthread_setschedprio F
GLIBC_2.12 pthread_setspecific F
GLIBC_2.12 pthread_sigmask F
+GLIBC_2.12 pthread_yield F
GLIBC_2.13 __fentry__ F
GLIBC_2.14 syncfs F
GLIBC_2.15 __fdelt_chk F
@@ -2641,6 +2642,7 @@ GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setschedprio F
+GLIBC_2.43 pthread_yield F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 6c9ca8e..b3afc03 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -34,7 +34,6 @@ GLIBC_2.12 pthread_spin_lock F
GLIBC_2.12 pthread_spin_trylock F
GLIBC_2.12 pthread_spin_unlock F
GLIBC_2.12 pthread_testcancel F
-GLIBC_2.12 pthread_yield F
GLIBC_2.12 sem_close F
GLIBC_2.12 sem_destroy F
GLIBC_2.12 sem_getvalue F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index 0e03d9d..88d180f 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1609,6 +1609,7 @@ GLIBC_2.38 pthread_setschedparam F
GLIBC_2.38 pthread_setschedprio F
GLIBC_2.38 pthread_setspecific F
GLIBC_2.38 pthread_sigmask F
+GLIBC_2.38 pthread_yield F
GLIBC_2.38 ptrace F
GLIBC_2.38 ptsname F
GLIBC_2.38 ptsname_r F
@@ -2323,6 +2324,7 @@ GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setschedprio F
+GLIBC_2.43 pthread_yield F
HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F
HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index e68935d..e76c359 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -56,7 +56,6 @@ GLIBC_2.38 pthread_spin_unlock F
GLIBC_2.38 pthread_testcancel F
GLIBC_2.38 pthread_timedjoin_np F
GLIBC_2.38 pthread_tryjoin_np F
-GLIBC_2.38 pthread_yield F
GLIBC_2.38 sem_clockwait F
GLIBC_2.38 sem_close F
GLIBC_2.38 sem_destroy F