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 | |
| parent | f03b78fae46905a5676c7b7f360cadba2f290708 (diff) | |
| download | glibc-5715c29e91076800418833f2196f2082f439da75.tar.xz glibc-5715c29e91076800418833f2196f2082f439da75.zip | |
nptl: Move __pthread_cleanup_routine into libc
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
64 files changed, 76 insertions, 33 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 6ac96ba1ca..9bb9c6f3da 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 ce9b0e6232..60202b4969 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 973f088be7..929818051c 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 diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 8016dd3ca2..4c9b8c12ac 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -338,6 +338,7 @@ GLIBC_2.17 __printf_fp F GLIBC_2.17 __profile_frequency F GLIBC_2.17 __progname D 0x8 GLIBC_2.17 __progname_full D 0x8 +GLIBC_2.17 __pthread_cleanup_routine F GLIBC_2.17 __ptsname_r_chk F GLIBC_2.17 __pwrite64 F GLIBC_2.17 __rawmemchr F @@ -2176,5 +2177,6 @@ GLIBC_2.33 mknodat F GLIBC_2.33 stat F GLIBC_2.33 stat64 F GLIBC_2.34 __libc_start_main F +GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 pthread_kill F GLIBC_2.34 pthread_mutex_consistent F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index b7effcabba..3d626919d8 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -3,7 +3,6 @@ GLIBC_2.17 _IO_ftrylockfile F GLIBC_2.17 _IO_funlockfile F GLIBC_2.17 __errno_location F GLIBC_2.17 __h_errno_location F -GLIBC_2.17 __pthread_cleanup_routine F GLIBC_2.17 __pthread_getspecific F GLIBC_2.17 __pthread_key_create F GLIBC_2.17 __pthread_mutex_destroy F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 389f3d5d3e..db4bd885f4 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2156,6 +2156,7 @@ GLIBC_2.3.2 pthread_cond_signal F GLIBC_2.3.2 pthread_cond_timedwait F GLIBC_2.3.2 pthread_cond_wait F GLIBC_2.3.2 strptime_l F +GLIBC_2.3.3 __pthread_cleanup_routine F GLIBC_2.3.3 _sys_siglist D 0x208 GLIBC_2.3.3 gnu_dev_major F GLIBC_2.3.3 gnu_dev_makedev F @@ -2264,6 +2265,7 @@ GLIBC_2.33 mknodat F GLIBC_2.33 stat F GLIBC_2.33 stat64 F GLIBC_2.34 __libc_start_main F +GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 pthread_kill F GLIBC_2.34 pthread_mutex_consistent F GLIBC_2.4 _IO_fprintf F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index ec8f6c7d94..8273920efe 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -157,7 +157,6 @@ GLIBC_2.3.2 pthread_cond_broadcast F GLIBC_2.3.2 pthread_cond_signal F GLIBC_2.3.2 pthread_cond_timedwait F GLIBC_2.3.2 pthread_cond_wait F -GLIBC_2.3.3 __pthread_cleanup_routine F GLIBC_2.3.3 __pthread_register_cancel F GLIBC_2.3.3 __pthread_register_cancel_defer F GLIBC_2.3.3 __pthread_unregister_cancel F diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index bcbbb7c813..9d636dc3c5 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -327,6 +327,7 @@ GLIBC_2.32 __printf_fp F GLIBC_2.32 __profile_frequency F GLIBC_2.32 __progname D 0x4 GLIBC_2.32 __progname_full D 0x4 +GLIBC_2.32 __pthread_cleanup_routine F GLIBC_2.32 __ptsname_r_chk F GLIBC_2.32 __pwrite64 F GLIBC_2.32 __rawmemchr F @@ -1935,5 +1936,6 @@ GLIBC_2.33 mknodat F GLIBC_2.33 stat F GLIBC_2.33 stat64 F GLIBC_2.34 __libc_start_main F +GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 pthread_kill F GLIBC_2.34 pthread_mutex_consistent F diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist index 1f7808940c..0993ee2246 100644 --- a/sysdeps/unix/sysv/linux/arc/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist @@ -3,7 +3,6 @@ GLIBC_2.32 _IO_ftrylockfile F |
