about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 11:52:56 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 20:21:27 +0200
commitc4c53e0f56ed14ba2416bb0181e82a9d49eefde0 (patch)
tree9ff07ab6c5b63d004daf561090e648b7bc053657 /nptl
parent3ec8b1c7a921baa673ad9a33e0c63b4571915caa (diff)
downloadglibc-c4c53e0f56ed14ba2416bb0181e82a9d49eefde0.tar.gz
glibc-c4c53e0f56ed14ba2416bb0181e82a9d49eefde0.tar.xz
glibc-c4c53e0f56ed14ba2416bb0181e82a9d49eefde0.zip
nptl: Move __pthread_register_cancel_defer, __pthread_unregister_cancel_restore to libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/cleanup_defer.c19
3 files changed, 21 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 68f27c15df..2d98e432a1 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -33,6 +33,7 @@ routines = \
   cancellation \
   cleanup \
   cleanup_compat \
+  cleanup_defer \
   cleanup_defer_compat \
   cleanup_routine \
   elision-conf \
@@ -196,7 +197,6 @@ shared-only-routines = forward
 static-only-routines = pthread_atfork
 
 libpthread-routines = \
-  cleanup_defer \
   events \
   libpthread-compat \
   nptl-init \
diff --git a/nptl/Versions b/nptl/Versions
index 7a47f9bbca..ac839fb296 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -152,7 +152,9 @@ libc {
   GLIBC_2.3.3 {
     __pthread_cleanup_routine;
     __pthread_register_cancel;
+    __pthread_register_cancel_defer;
     __pthread_unregister_cancel;
+    __pthread_unregister_cancel_restore;
     __pthread_unwind_next;
     pthread_attr_getaffinity_np;
     pthread_attr_setaffinity_np;
@@ -237,7 +239,9 @@ libc {
     __pthread_mutex_lock;
     __pthread_mutex_unlock;
     __pthread_register_cancel;
+    __pthread_register_cancel_defer;
     __pthread_unregister_cancel;
+    __pthread_unregister_cancel_restore;
     call_once;
     cnd_broadcast;
     cnd_destroy;
@@ -441,8 +445,6 @@ libpthread {
   }
 
   GLIBC_2.3.3 {
-    __pthread_register_cancel_defer;
-    __pthread_unregister_cancel_restore;
     pthread_setaffinity_np;
   }
 
diff --git a/nptl/cleanup_defer.c b/nptl/cleanup_defer.c
index 08271e352f..6d85359118 100644
--- a/nptl/cleanup_defer.c
+++ b/nptl/cleanup_defer.c
@@ -18,11 +18,11 @@
 
 #include <stdlib.h>
 #include "pthreadP.h"
-
+#include <shlib-compat.h>
 
 void
 __cleanup_fct_attribute
-__pthread_register_cancel_defer (__pthread_unwind_buf_t *buf)
+___pthread_register_cancel_defer (__pthread_unwind_buf_t *buf)
 {
   struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
   struct pthread *self = THREAD_SELF;
@@ -56,11 +56,17 @@ __pthread_register_cancel_defer (__pthread_unwind_buf_t *buf)
   /* Store the new cleanup handler info.  */
   THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf);
 }
+versioned_symbol (libc, ___pthread_register_cancel_defer,
+		  __pthread_register_cancel_defer, GLIBC_2_34);
 
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_register_cancel_defer,
+	       __pthread_register_cancel_defer, GLIBC_2_3_3);
+#endif
 
 void
 __cleanup_fct_attribute
-__pthread_unregister_cancel_restore (__pthread_unwind_buf_t *buf)
+___pthread_unregister_cancel_restore (__pthread_unwind_buf_t *buf)
 {
   struct pthread *self = THREAD_SELF;
   struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
@@ -89,3 +95,10 @@ __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *buf)
       CANCELLATION_P (self);
     }
 }
+versioned_symbol (libc, ___pthread_unregister_cancel_restore,
+		  __pthread_unregister_cancel_restore, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_unregister_cancel_restore,
+	       __pthread_unregister_cancel_restore, GLIBC_2_3_3);
+#endif