diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-04-23 09:46:03 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-04-23 09:46:03 +0200 |
| commit | 9b7ab14e112476c96e7b20fb23e6838b7012dfda (patch) | |
| tree | 19959c497b673fc06fecee555114c43f05d1e8a1 | |
| parent | 2e825f7d5a8a84b6389a27c138a903dfa464519a (diff) | |
| download | glibc-9b7ab14e112476c96e7b20fb23e6838b7012dfda.tar.xz glibc-9b7ab14e112476c96e7b20fb23e6838b7012dfda.zip | |
nptl: Move pthread_mutexattr_getrobust into libc
And pthread_mutexattr_getrobust_np as a compat symbol.
The symbols were moved using scripts/move-symbol-to-libc.py.
66 files changed, 128 insertions, 67 deletions
@@ -24,6 +24,10 @@ Deprecated and removed features, and other changes affecting compatibility: should use the equivalent standard function pthread_mutex_consistent instead. +* The function pthread_mutexattr_getrobust_np has been deprecated; + programs should use the equivalent standard function + pthread_mutexattr_getrobust instead. + Changes to build and runtime requirements: * On Linux, the shm_open, sem_open, and related functions now expect the diff --git a/nptl/Makefile b/nptl/Makefile index 7beced1aa0..196c03bd32 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -107,6 +107,7 @@ routines = \ pthread_mutexattr_getprioceiling \ pthread_mutexattr_getprotocol \ pthread_mutexattr_getpshared \ + pthread_mutexattr_getrobust \ pthread_once \ pthread_rwlock_rdlock \ pthread_rwlock_unlock \ @@ -166,7 +167,6 @@ libpthread-routines = \ pthread_getname \ pthread_join \ pthread_join_common \ - pthread_mutexattr_getrobust \ pthread_mutexattr_gettype \ pthread_mutexattr_init \ pthread_mutexattr_setprioceiling \ diff --git a/nptl/Versions b/nptl/Versions index 646cb3691d..c452d41466 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -97,9 +97,11 @@ libc { pthread_mutex_setprioceiling; pthread_mutexattr_getprioceiling; pthread_mutexattr_getprotocol; + pthread_mutexattr_getrobust_np; } GLIBC_2.12 { pthread_mutex_consistent; + pthread_mutexattr_getrobust; } # C11 thread symbols. GLIBC_2.28 { @@ -142,6 +144,7 @@ libc { pthread_mutexattr_destroy; pthread_mutexattr_getprioceiling; pthread_mutexattr_getprotocol; + pthread_mutexattr_getrobust; pthread_once; pthread_rwlock_rdlock; pthread_rwlock_unlock; @@ -331,7 +334,6 @@ libpthread { } GLIBC_2.4 { - pthread_mutexattr_getrobust_np; pthread_mutexattr_setprioceiling; pthread_mutexattr_setprotocol; pthread_mutexattr_setrobust_np; @@ -343,7 +345,6 @@ libpthread { GLIBC_2.12 { pthread_getname_np; - pthread_mutexattr_getrobust; pthread_mutexattr_setrobust; pthread_setname_np; }; diff --git a/nptl/pthread_mutexattr_getrobust.c b/nptl/pthread_mutexattr_getrobust.c index 0929898eea..7fb0a676a6 100644 --- a/nptl/pthread_mutexattr_getrobust.c +++ b/nptl/pthread_mutexattr_getrobust.c @@ -17,10 +17,11 @@ <https://www.gnu.org/licenses/>. */ #include <pthreadP.h> - +#include <shlib-compat.h> int -pthread_mutexattr_getrobust (const pthread_mutexattr_t *attr, int *robustness) +__pthread_mutexattr_getrobust (const pthread_mutexattr_t *attr, + int *robustness) { const struct pthread_mutexattr *iattr; @@ -31,4 +32,15 @@ pthread_mutexattr_getrobust (const pthread_mutexattr_t *attr, int *robustness) return 0; } -weak_alias (pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np) +versioned_symbol (libc, __pthread_mutexattr_getrobust, + pthread_mutexattr_getrobust, GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_4, GLIBC_2_34) +compat_symbol (libpthread, __pthread_mutexattr_getrobust, + pthread_mutexattr_getrobust_np, GLIBC_2_4); +#endif + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34) +compat_symbol (libpthread, __pthread_mutexattr_getrobust, + pthread_mutexattr_getrobust, GLIBC_2_12); +#endif diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h index 23bcd51d91..c5ad98f354 100644 --- a/sysdeps/nptl/pthread.h +++ b/sysdeps/nptl/pthread.h @@ -885,9 +885,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # ifdef __USE_GNU -extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, - int *__robustness) - __THROW __nonnull ((1, 2)); +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np, + (pthread_mutex_t *, int *), + pthread_mutexattr_getrobust) __nonnull ((1)) + __attribute_deprecated_msg__ ("\ +pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"); +# else +# define pthread_mutexattr_getrobust_np pthread_mutexattr_getrobust +# endif # endif /* Set the robustness flag of the mutex attribute ATTR. */ diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index fae63e8abf..ccf9fd6b55 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1481,6 +1481,8 @@ GLIBC_2.17 pthread_mutexattr_destroy F GLIBC_2.17 pthread_mutexattr_getprioceiling F GLIBC_2.17 pthread_mutexattr_getprotocol F GLIBC_2.17 pthread_mutexattr_getpshared F +GLIBC_2.17 pthread_mutexattr_getrobust F +GLIBC_2.17 pthread_mutexattr_getrobust_np F GLIBC_2.17 pthread_once F GLIBC_2.17 pthread_rwlock_rdlock F GLIBC_2.17 pthread_rwlock_unlock F @@ -2240,6 +2242,7 @@ GLIBC_2.34 pthread_mutexattr_destroy F GLIBC_2.34 pthread_mutexattr_getprioceiling F GLIBC_2.34 pthread_mutexattr_getprotocol F GLIBC_2.34 pthread_mutexattr_getpshared F +GLIBC_2.34 pthread_mutexattr_getrobust F GLIBC_2.34 pthread_once F GLIBC_2.34 pthread_rwlock_rdlock F GLIBC_2.34 pthread_rwlock_unlock F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index fcdde62efb..9 |
