From b76658451c819c87adb2e7055b19e7600acc2ae6 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 3 Dec 2020 11:43:25 -0300 Subject: nptl: Move pthread_kill to libc A new 2.34 version is also provided. Checked on x86_64-linux-gnu. --- nptl/Makefile | 2 +- nptl/Versions | 5 ++++- nptl/pthread_kill.c | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index 6ff2d5e208..1e01d8e24c 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -71,6 +71,7 @@ routines = \ pthread_getaffinity \ pthread_getattr_np \ pthread_getschedparam \ + pthread_kill \ pthread_self \ pthread_setschedparam \ pthread_sigmask \ @@ -140,7 +141,6 @@ libpthread-routines = \ pthread_join_common \ pthread_key_create \ pthread_key_delete \ - pthread_kill \ pthread_kill_other_threads \ pthread_mutex_cond_lock \ pthread_mutex_conf \ diff --git a/nptl/Versions b/nptl/Versions index 674b31e87e..4b91eacc4a 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -23,6 +23,7 @@ libc { pthread_equal; pthread_exit; pthread_getschedparam; + pthread_kill; pthread_mutex_destroy; pthread_mutex_init; pthread_mutex_lock; @@ -70,6 +71,9 @@ libc { pthread_getattr_np; pthread_sigmask; } + GLIBC_2.34 { + pthread_kill; + } GLIBC_PRIVATE { __futex_abstimed_wait64; __futex_abstimed_wait_cancelable64; @@ -141,7 +145,6 @@ libpthread { pthread_join; pthread_key_create; pthread_key_delete; - pthread_kill; pthread_kill_other_threads_np; pthread_mutex_destroy; pthread_mutex_init; diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c index 84b40478aa..ad7e011779 100644 --- a/nptl/pthread_kill.c +++ b/nptl/pthread_kill.c @@ -18,6 +18,7 @@ #include #include +#include int __pthread_kill (pthread_t threadid, int signo) @@ -43,4 +44,8 @@ __pthread_kill (pthread_t threadid, int signo) return (INTERNAL_SYSCALL_ERROR_P (val) ? INTERNAL_SYSCALL_ERRNO (val) : 0); } -strong_alias (__pthread_kill, pthread_kill) +versioned_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_0); +#endif -- cgit 1.4.1