From: gfleury <gfle...@disroot.org> Message-ID: <20250815181500.107433-12-gfle...@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 5 +++-- htl/pt-testcancel.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile index 0acd3a8868..ecfa3c1779 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -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 \ diff --git a/htl/Versions b/htl/Versions index 06977e677b..0f22745914 100644 --- a/htl/Versions +++ b/htl/Versions @@ -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; diff --git a/htl/pt-testcancel.c b/htl/pt-testcancel.c index 4eef765f30..0332f6dd74 100644 --- a/htl/pt-testcancel.c +++ b/htl/pt-testcancel.c @@ -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 diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 1538fdee72..dd9d77776f 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -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); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 6056958fcd..a676cd0f75 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -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 diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index afb9e6064d..044fb1c355 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -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 diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index b17e1980b5..dff8eee881 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -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 diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index f1fef475ad..66f06f82b3 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -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 -- 2.47.2