htl: move pthread_testcancel into libc.

Message-ID: <20250815181500.107433-12-gfleury@disroot.org>
This commit is contained in:
gfleury 2025-08-15 20:14:52 +02:00 committed by Samuel Thibault
parent edcc9ca48c
commit 6541288cb5
8 changed files with 17 additions and 6 deletions

View File

@ -32,7 +32,6 @@ libpthread-routines := \
pt-initialize \
pt-join \
pt-spin-inlines \
pt-testcancel \
pt-mutex-transfer-np \
pt-hurd-cond-wait \
pt-hurd-cond-timedwait \
@ -204,6 +203,7 @@ routines := \
pt-sigstate \
pt-sigstate-destroy \
pt-stack-alloc \
pt-testcancel \
pt-thread-alloc \
pt-thread-start \
pt-thread-terminate \

View File

@ -93,6 +93,7 @@ libc {
pthread_setschedprio;
pthread_setspecific;
pthread_sigmask;
pthread_testcancel;
pthread_yield;
}
@ -201,6 +202,7 @@ libc {
pthread_kill;
pthread_setconcurrency;
pthread_setschedprio;
pthread_testcancel;
pthread_yield;
}
@ -255,6 +257,7 @@ libc {
__pthread_sigstate_destroy;
__pthread_sigmask;
__pthread_stack_alloc;
__pthread_testcancel;
__pthread_timedblock;
__pthread_timedblock_intr;
__pthread_thread_alloc;
@ -296,8 +299,6 @@ libpthread {
pthread_mutex_transfer_np;
pthread_testcancel;
sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post;
sem_timedwait; sem_trywait; sem_unlink; sem_wait;

View File

@ -20,6 +20,7 @@
#include <pt-internal.h>
#include <pthreadP.h>
#include <shlib-compat.h>
void
__pthread_testcancel (void)
@ -34,4 +35,10 @@ __pthread_testcancel (void)
if (cancelled)
__pthread_exit (PTHREAD_CANCELED);
}
strong_alias (__pthread_testcancel, pthread_testcancel)
libc_hidden_def (__pthread_testcancel)
versioned_symbol (libc, __pthread_testcancel, pthread_testcancel, GLIBC_2_43);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
compat_symbol (libpthread, __pthread_testcancel, pthread_testcancel, GLIBC_2_12);
#endif

View File

@ -212,6 +212,7 @@ libc_hidden_proto (__pthread_attr_setstack)
int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
libc_hidden_proto (__pthread_attr_getstack)
void __pthread_testcancel (void);
libc_hidden_proto (__pthread_testcancel)
int __pthread_attr_init (pthread_attr_t *attr);
int __pthread_condattr_init (pthread_condattr_t *attr);
int __pthread_setconcurrency (int __new_level);

View File

@ -120,6 +120,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_testcancel F
GLIBC_2.12 pthread_yield F
GLIBC_2.13 __fentry__ F
GLIBC_2.14 syncfs F
@ -2647,6 +2648,7 @@ GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_yield F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F

View File

@ -30,7 +30,6 @@ GLIBC_2.12 pthread_spin_init F
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 sem_close F
GLIBC_2.12 sem_destroy F
GLIBC_2.12 sem_getvalue F

View File

@ -1612,6 +1612,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_testcancel F
GLIBC_2.38 pthread_yield F
GLIBC_2.38 ptrace F
GLIBC_2.38 ptsname F
@ -2329,6 +2330,7 @@ GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_yield F
HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F

View File

@ -50,7 +50,6 @@ GLIBC_2.38 pthread_spin_init F
GLIBC_2.38 pthread_spin_lock F
GLIBC_2.38 pthread_spin_trylock F
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 sem_clockwait F