1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-10-24 01:33:52 +03:00

htl: move pthread_yield into libc.

Message-ID: <20250815181500.107433-8-gfleury@disroot.org>
This commit is contained in:
gfleury
2025-08-15 20:14:48 +02:00
committed by Samuel Thibault
parent fa35ccbba8
commit 2dcb8fb8e7
7 changed files with 15 additions and 5 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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