diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:12:11 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:14:49 +0200 |
| commit | eef936eb458e5dfccceee6d3c4220f9a1c62832b (patch) | |
| tree | 00c1601e791ccc135b4c37385520b997bb30331f | |
| parent | 3eab466e566c5c28cbec55b092fe21e134baac22 (diff) | |
| download | glibc-eef936eb458e5dfccceee6d3c4220f9a1c62832b.tar.xz glibc-eef936eb458e5dfccceee6d3c4220f9a1c62832b.zip | |
nptl: Move cnd_signal into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
The __pthread_cond_signal@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
65 files changed, 81 insertions, 35 deletions
diff --git a/nptl/Versions b/nptl/Versions index 3b11cc1797..b18709c8e1 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -130,6 +130,7 @@ libc { cnd_broadcast; cnd_destroy; cnd_init; + cnd_signal; thrd_current; thrd_equal; thrd_sleep; @@ -162,6 +163,7 @@ libc { cnd_broadcast; cnd_destroy; cnd_init; + cnd_signal; pthread_cond_clockwait; pthread_condattr_getclock; pthread_condattr_getpshared; @@ -224,7 +226,6 @@ libc { __pthread_cleanup_pop; __pthread_cleanup_push; __pthread_cleanup_upto; - __pthread_cond_signal; # Used by the C11 threads. __pthread_cond_timedwait; # Used by the C11 threads. __pthread_cond_wait; # Used by the C11 threads. __pthread_current_priority; @@ -377,7 +378,6 @@ libpthread { # C11 thread symbols. GLIBC_2.28 { - cnd_signal; cnd_timedwait; cnd_wait; mtx_destroy; diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c index 17b4a69702..171193b13e 100644 --- a/nptl/pthread_cond_signal.c +++ b/nptl/pthread_cond_signal.c @@ -98,5 +98,6 @@ ___pthread_cond_signal (pthread_cond_t *cond) versioned_symbol (libpthread, ___pthread_cond_signal, pthread_cond_signal, GLIBC_2_3_2); libc_hidden_ver (___pthread_cond_signal, __pthread_cond_signal) -versioned_symbol (libpthread, ___pthread_cond_signal, - __pthread_cond_signal, GLIBC_PRIVATE); +#ifndef SHARED +strong_alias (___pthread_cond_signal, __pthread_cond_signal) +#endif diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 6ef49cd4b4..fcc5f841fd 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -34,7 +34,7 @@ routines += thrd_current thrd_equal thrd_sleep thrd_yield libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \ mtx_destroy mtx_init mtx_lock mtx_timedlock \ mtx_trylock mtx_unlock \ - cnd_signal cnd_timedwait cnd_wait \ + cnd_timedwait cnd_wait \ tss_create tss_delete tss_get tss_set $(libpthread-routines-var) += \ @@ -42,6 +42,7 @@ $(libpthread-routines-var) += \ cnd_broadcast \ cnd_destroy \ cnd_init \ + cnd_signal \ 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/cnd_signal.c b/sysdeps/pthread/cnd_signal.c index 48b0f6a8d6..2800dd442f 100644 --- a/sysdeps/pthread/cnd_signal.c +++ b/sysdeps/pthread/cnd_signal.c @@ -17,10 +17,19 @@ <https://www.gnu.org/licenses/>. */ #include "thrd_priv.h" +#include <shlib-compat.h> int -cnd_signal (cnd_t *cond) +__cnd_signal (cnd_t *cond) { int err_code = __pthread_cond_signal ((pthread_cond_t *) cond); return thrd_err_map (err_code); } +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __cnd_signal, cnd_signal, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34) +compat_symbol (libpthread, __cnd_signal, cnd_signal, GLIBC_2_28); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__cnd_signal, cnd_signal) +#endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 82dc863ef3..defb9dc974 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2202,6 +2202,7 @@ GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F GLIBC_2.28 cnd_init F +GLIBC_2.28 cnd_signal F GLIBC_2.28 fcntl64 F GLIBC_2.28 renameat2 F GLIBC_2.28 statx F @@ -2257,6 +2258,7 @@ GLIBC_2.34 call_once F GLIBC_2.34 cnd_broadcast F GLIBC_2.34 cnd_destroy F GLIBC_2.34 cnd_init F +GLIBC_2.34 cnd_signal F GLIBC_2.34 pthread_cond_clockwait F GLIBC_2.34 pthread_condattr_getclock F GLIBC_2.34 pthread_condattr_getpshared F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index 93724a8ff9..2a03782c65 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -69,7 +69,6 @@ GLIBC_2.17 sem_unlink F GLIBC_2.17 sem_wait F GLIBC_2.18 pthread_getattr_default_np F GLIBC_2.18 pthread_setattr_default_np F -GLIBC_2.28 cnd_signal F GLIBC_2.28 cnd_timedwait F GLIBC_2.28 cnd_wait F GLIBC_2.28 mtx_destroy F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 8329679f29..46fb382ab6 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2095,6 +2095,7 @@ GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F GLIBC_2.28 cnd_init F +GLIBC_2.28 cnd_signal F GLIBC_2.28 fcntl64 F GLIBC_2.28 renameat2 F GLIBC_2.28 statx F @@ -2338,6 +2339,7 @@ GLIBC_2.34 call_once F GLIBC_2.34 cnd_broadcast F GLIBC_2.34 cnd_destroy F GLIBC_2.34 cnd_init F +GLIBC_2.34 cnd_signal F GLIBC_2.34 pthread_cond_clockwait F GLIBC_2.34 pthread_condattr_getclock F GLIBC_2.34 pthread_condattr_getpshared F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index fa03817bb4..95cf8307c1 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist |
