diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:12:12 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:17:15 +0200 |
| commit | 96e61709b49c3ebe4fa49c235ddafaad1f1dfc84 (patch) | |
| tree | e4b70b05f8bcf16d54d0ad9761149b15d3f4913c | |
| parent | ae4a5ca07496e8ae8a74924095f0161d4c759328 (diff) | |
| download | glibc-96e61709b49c3ebe4fa49c235ddafaad1f1dfc84.tar.xz glibc-96e61709b49c3ebe4fa49c235ddafaad1f1dfc84.zip | |
nptl: Move thrd_exit into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
The __pthread_exit@@GLIBC_PRIVATE symbol is no longer needed
after this change, so remove it.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
64 files changed, 78 insertions, 33 deletions
diff --git a/nptl/Versions b/nptl/Versions index 47704ba4d1..834fdbbd87 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -141,6 +141,7 @@ libc { mtx_unlock; thrd_current; thrd_equal; + thrd_exit; thrd_sleep; thrd_yield; } @@ -210,6 +211,7 @@ libc { pthread_spin_lock; pthread_spin_trylock; pthread_spin_unlock; + thrd_exit; } GLIBC_PRIVATE { __futex_abstimed_wait64; @@ -239,7 +241,6 @@ libc { __pthread_cleanup_push; __pthread_cleanup_upto; __pthread_current_priority; - __pthread_exit; __pthread_force_elision; __pthread_getattr_default_np; __pthread_key_delete; @@ -389,7 +390,6 @@ libpthread { GLIBC_2.28 { thrd_create; thrd_detach; - thrd_exit; thrd_join; tss_create; tss_delete; diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 6f204ccab2..75a74be340 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -31,7 +31,7 @@ headers += threads.h routines += thrd_current thrd_equal thrd_sleep thrd_yield -libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \ +libpthread-routines += thrd_create thrd_detach thrd_join \ tss_create tss_delete tss_get tss_set $(libpthread-routines-var) += \ @@ -48,6 +48,7 @@ $(libpthread-routines-var) += \ mtx_timedlock \ mtx_trylock \ mtx_unlock \ + thrd_exit \ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ diff --git a/sysdeps/pthread/thrd_exit.c b/sysdeps/pthread/thrd_exit.c index 7348e83dcc..1554af422c 100644 --- a/sysdeps/pthread/thrd_exit.c +++ b/sysdeps/pthread/thrd_exit.c @@ -16,10 +16,19 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +#include <shlib-compat.h> #include "thrd_priv.h" _Noreturn void -thrd_exit (int res) +__thrd_exit (int res) { __pthread_exit ((void*)(uintptr_t) res); } +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __thrd_exit, thrd_exit, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34) +compat_symbol (libpthread, __thrd_exit, thrd_exit, GLIBC_2_28); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__thrd_exit, thrd_exit) +#endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index fddeb25a72..9390752b11 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2216,6 +2216,7 @@ GLIBC_2.28 renameat2 F GLIBC_2.28 statx F GLIBC_2.28 thrd_current F GLIBC_2.28 thrd_equal F +GLIBC_2.28 thrd_exit F GLIBC_2.28 thrd_sleep F GLIBC_2.28 thrd_yield F GLIBC_2.29 getcpu F @@ -2307,3 +2308,4 @@ GLIBC_2.34 pthread_spin_init F GLIBC_2.34 pthread_spin_lock F GLIBC_2.34 pthread_spin_trylock F GLIBC_2.34 pthread_spin_unlock F +GLIBC_2.34 thrd_exit F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index d18f1540f8..2e044698b7 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.18 pthread_getattr_default_np F GLIBC_2.18 pthread_setattr_default_np F GLIBC_2.28 thrd_create F GLIBC_2.28 thrd_detach F -GLIBC_2.28 thrd_exit F GLIBC_2.28 thrd_join F GLIBC_2.28 tss_create F GLIBC_2.28 tss_delete F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 38d2821356..01830f4b8c 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2109,6 +2109,7 @@ GLIBC_2.28 renameat2 F GLIBC_2.28 statx F GLIBC_2.28 thrd_current F GLIBC_2.28 thrd_equal F +GLIBC_2.28 thrd_exit F GLIBC_2.28 thrd_sleep F GLIBC_2.28 thrd_yield F GLIBC_2.29 getcpu F @@ -2388,6 +2389,7 @@ GLIBC_2.34 pthread_spin_init F GLIBC_2.34 pthread_spin_lock F GLIBC_2.34 pthread_spin_trylock F GLIBC_2.34 pthread_spin_unlock F +GLIBC_2.34 thrd_exit F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index 0357adc360..69716922ba 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.2.3 __libpthread_version_placeholder F GLIBC_2.2.6 __libpthread_version_placeholder F GLIBC_2.28 thrd_create F GLIBC_2.28 thrd_detach F -GLIBC_2.28 thrd_exit F GLIBC_2.28 thrd_join F GLIBC_2.28 tss_create F GLIBC_2.28 tss_delete F diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index 08d1092337..f647e9ceb9 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -1824,6 +1824,7 @@ GLIBC_2.32 tfind F GLIBC_2.32 tgkill F GLIBC_2.32 thrd_current F GLIBC_2.32 thrd_equal F +GLIBC_2.32 thrd_exit F GLIBC_2.32 thrd_sleep F GLIBC_2.32 thrd_yield F GLIBC_2.32 time F @@ -2066,3 +2067,4 @@ GLIBC_2.34 pthread_spin_init F GLIBC_2.34 pthread_spin_lock F GLIBC_2.34 pthread_spin_trylock F GLIBC_2.34 pthread_spin_unlock F +GLIBC_2.34 thrd_exit F |
