about summary refs log tree commit diff
path: root/nptl/pthread_testcancel.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-05 17:15:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-05 17:19:20 +0200
commit0197c1bc604e1d6357cfa07a75ab73bababa7f0f (patch)
tree3f620328ff2ee6ec68b296ee86d061067a6aa268 /nptl/pthread_testcancel.c
parent7cbf1c8416b04c65dc3d253061d8a674ee3c616e (diff)
downloadglibc-0197c1bc604e1d6357cfa07a75ab73bababa7f0f.tar.gz
glibc-0197c1bc604e1d6357cfa07a75ab73bababa7f0f.tar.xz
glibc-0197c1bc604e1d6357cfa07a75ab73bababa7f0f.zip
nptl: Move pthread_testcancel into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

A temporary __pthread_testcancel@@GLIBC_PRIVATE export is created
because it is needed by the semaphore implementation.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_testcancel.c')
-rw-r--r--nptl/pthread_testcancel.c14
1 files changed, 10 insertions, 4 deletions
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