about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions4
-rw-r--r--nptl/pthreadP.h2
-rw-r--r--nptl/pthread_testcancel.c14
4 files changed, 15 insertions, 7 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 38f2715c2c..884cb69bb4 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -148,6 +148,7 @@ routines = \
   pthread_spin_lock \
   pthread_spin_trylock \
   pthread_spin_unlock \
+  pthread_testcancel \
   pthread_yield \
   tpp \
   unwind \
@@ -199,7 +200,6 @@ libpthread-routines = \
   pthread_setname \
   pthread_setschedprio \
   pthread_sigqueue \
-  pthread_testcancel \
   pthread_timedjoin \
   pthread_tryjoin \
   sem_clockwait \
diff --git a/nptl/Versions b/nptl/Versions
index 0914630be3..ce09c73727 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -61,6 +61,7 @@ libc {
     pthread_setschedparam;
     pthread_setspecific;
     pthread_sigmask;
+    pthread_testcancel;
   }
   GLIBC_2.1 {
     pthread_attr_init;
@@ -245,6 +246,7 @@ libc {
     pthread_spin_lock;
     pthread_spin_trylock;
     pthread_spin_unlock;
+    pthread_testcancel;
     thrd_exit;
     tss_create;
     tss_delete;
@@ -284,6 +286,7 @@ libc {
     __pthread_keys;
     __pthread_mutex_unlock_usercnt;
     __pthread_setcancelstate;
+    __pthread_testcancel;
     __pthread_tpp_change_priority;
     __pthread_unwind;
     __sched_fifo_max_prio;
@@ -307,7 +310,6 @@ libpthread {
     pthread_detach;
     pthread_join;
     pthread_sigmask;
-    pthread_testcancel;
     sem_destroy;
     sem_getvalue;
     sem_init;
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 0ce63672c4..d480639740 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -570,6 +570,7 @@ libc_hidden_proto (__pthread_setcanceltype)
 extern int __pthread_enable_asynccancel (void) attribute_hidden;
 extern void __pthread_disable_asynccancel (int oldtype) attribute_hidden;
 extern void __pthread_testcancel (void);
+libc_hidden_proto (__pthread_testcancel)
 extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t,
 				   const struct __timespec64 *, bool)
   attribute_hidden;
@@ -579,7 +580,6 @@ libc_hidden_proto (__pthread_sigmask);
 
 #if IS_IN (libpthread)
 hidden_proto (__pthread_rwlock_unlock)
-hidden_proto (__pthread_testcancel)
 #endif
 
 extern int __pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond);
diff --git a/nptl/pthread_testcancel.c b/nptl/pthread_testcancel.c
index 8ed2370afa..a9e941ddb7 100644
--- a/nptl/pthread_testcancel.c
+++ b/nptl/pthread_testcancel.c
@@ -18,12 +18,18 @@
 
 #include <stdlib.h>
 #include "pthreadP.h"
-
+#include <shlib-compat.h>
 
 void
-__pthread_testcancel (void)
+___pthread_testcancel (void)
 {
   CANCELLATION_P (THREAD_SELF);
 }
-strong_alias (__pthread_testcancel, pthread_testcancel)
-hidden_def (__pthread_testcancel)
+versioned_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_34);
+versioned_symbol (libc, ___pthread_testcancel, __pthread_testcancel,
+                  GLIBC_PRIVATE);
+libc_hidden_ver (___pthread_testcancel, __pthread_testcancel)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_0);
+#endif