From d7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 11 May 2021 11:56:37 +0200 Subject: nptl: Move pthread_cancel into libc The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella --- nptl/Makefile | 2 +- nptl/Versions | 3 ++- nptl/pthreadP.h | 1 - nptl/pthread_cancel.c | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index 2d98e43..5ce295c 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -94,6 +94,7 @@ routines = \ pthread_barrierattr_getpshared \ pthread_barrierattr_init \ pthread_barrierattr_setpshared \ + pthread_cancel \ pthread_cleanup_upto \ pthread_clockjoin \ pthread_cond_broadcast \ @@ -201,7 +202,6 @@ libpthread-routines = \ libpthread-compat \ nptl-init \ pt-interp \ - pthread_cancel \ pthread_create \ pthread_getattr_default_np \ pthread_getconcurrency \ diff --git a/nptl/Versions b/nptl/Versions index ac839fb..776abde 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -29,6 +29,7 @@ libc { pthread_attr_setschedparam; pthread_attr_setschedpolicy; pthread_attr_setscope; + pthread_cancel; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; @@ -271,6 +272,7 @@ libc { pthread_barrierattr_getpshared; pthread_barrierattr_init; pthread_barrierattr_setpshared; + pthread_cancel; pthread_clockjoin_np; pthread_cond_clockwait; pthread_condattr_getclock; @@ -406,7 +408,6 @@ libpthread { flockfile; ftrylockfile; funlockfile; - pthread_cancel; pthread_create; pthread_sigmask; } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 1692788..5b844f3 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -521,7 +521,6 @@ extern pthread_t __pthread_self (void); extern int __pthread_equal (pthread_t thread1, pthread_t thread2); extern int __pthread_detach (pthread_t th); libc_hidden_proto (__pthread_detach) -extern int __pthread_cancel (pthread_t th); extern int __pthread_kill (pthread_t threadid, int signo); extern void __pthread_exit (void *value) __attribute__ ((__noreturn__)); libc_hidden_proto (__pthread_exit) diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index fd04bed..e4ad602 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -100,6 +100,10 @@ __pthread_cancel (pthread_t th) return result; } -weak_alias (__pthread_cancel, pthread_cancel) +versioned_symbol (libc, __pthread_cancel, pthread_cancel, GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libpthread, __pthread_cancel, pthread_cancel, GLIBC_2_0); +#endif PTHREAD_STATIC_FN_REQUIRE (__pthread_create) -- cgit v1.1