diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:50 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:50 +0200 |
commit | 5715c29e91076800418833f2196f2082f439da75 (patch) | |
tree | a55e45379c0b3f134471312e55d87166f46ca894 /nptl | |
parent | f03b78fae46905a5676c7b7f360cadba2f290708 (diff) | |
download | glibc-5715c29e91076800418833f2196f2082f439da75.zip glibc-5715c29e91076800418833f2196f2082f439da75.tar.gz glibc-5715c29e91076800418833f2196f2082f439da75.tar.bz2 |
nptl: Move __pthread_cleanup_routine into libc
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 3 | ||||
-rw-r--r-- | nptl/cleanup_routine.c | 11 |
3 files changed, 12 insertions, 4 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 6ac96ba..9bb9c6f 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -30,6 +30,7 @@ extra-libs-others := $(extra-libs) routines = \ alloca_cutoff \ + cleanup_routine \ elision-conf \ elision-lock \ elision-timed \ @@ -86,7 +87,6 @@ libpthread-routines = \ cleanup_compat \ cleanup_defer \ cleanup_defer_compat \ - cleanup_routine \ events \ flockfile \ ftrylockfile \ diff --git a/nptl/Versions b/nptl/Versions index ce9b0e6..60202b4 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -50,6 +50,7 @@ libc { pthread_cond_wait; } GLIBC_2.3.3 { + __pthread_cleanup_routine; pthread_attr_setaffinity_np; pthread_getaffinity_np; } @@ -78,6 +79,7 @@ libc { pthread_sigmask; } GLIBC_2.34 { + __pthread_cleanup_routine; pthread_kill; pthread_mutex_consistent; } @@ -267,7 +269,6 @@ libpthread { } GLIBC_2.3.3 { - __pthread_cleanup_routine; __pthread_register_cancel; __pthread_register_cancel_defer; __pthread_unregister_cancel; diff --git a/nptl/cleanup_routine.c b/nptl/cleanup_routine.c index 973f088..9298180 100644 --- a/nptl/cleanup_routine.c +++ b/nptl/cleanup_routine.c @@ -17,11 +17,18 @@ <https://www.gnu.org/licenses/>. */ #include <pthread.h> - +#include <shlib-compat.h> void -__pthread_cleanup_routine (struct __pthread_cleanup_frame *f) +___pthread_cleanup_routine (struct __pthread_cleanup_frame *f) { if (f->__do_it) f->__cancel_routine (f->__cancel_arg); } +versioned_symbol (libc, ___pthread_cleanup_routine, __pthread_cleanup_routine, + GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_cleanup_routine, + __pthread_cleanup_routine, GLIBC_2_3_3); +#endif |