aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:50 +0200
commitf03b78fae46905a5676c7b7f360cadba2f290708 (patch)
tree322292da3aeeb1b8e5504afaf089d8a486228303 /nptl
parent2208066603a136f95cfb815ca9281262e6465784 (diff)
downloadglibc-f03b78fae46905a5676c7b7f360cadba2f290708.tar
glibc-f03b78fae46905a5676c7b7f360cadba2f290708.tar.gz
glibc-f03b78fae46905a5676c7b7f360cadba2f290708.tar.bz2
glibc-f03b78fae46905a5676c7b7f360cadba2f290708.zip
nptl: Move pthread_mutex_consistent into libc
And deprecated pthread_mutex_consistent_np, its old name. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions9
-rw-r--r--nptl/pthread_mutex_consistent.c18
3 files changed, 23 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index e665d37e52..6ac96ba1ca 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -72,6 +72,7 @@ routines = \
pthread_getattr_np \
pthread_getschedparam \
pthread_kill \
+ pthread_mutex_consistent \
pthread_self \
pthread_setschedparam \
pthread_sigmask \
@@ -142,7 +143,6 @@ libpthread-routines = \
pthread_kill_other_threads \
pthread_mutex_cond_lock \
pthread_mutex_conf \
- pthread_mutex_consistent \
pthread_mutex_destroy \
pthread_mutex_getprioceiling \
pthread_mutex_init \
diff --git a/nptl/Versions b/nptl/Versions
index 494fb3efd9..ce9b0e6232 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -56,6 +56,12 @@ libc {
GLIBC_2.3.4 {
pthread_attr_setaffinity_np;
}
+ GLIBC_2.4 {
+ pthread_mutex_consistent_np;
+ }
+ GLIBC_2.12 {
+ pthread_mutex_consistent;
+ }
# C11 thread symbols.
GLIBC_2.28 {
thrd_current;
@@ -73,6 +79,7 @@ libc {
}
GLIBC_2.34 {
pthread_kill;
+ pthread_mutex_consistent;
}
GLIBC_PRIVATE {
__futex_abstimed_wait64;
@@ -283,7 +290,6 @@ libpthread {
}
GLIBC_2.4 {
- pthread_mutex_consistent_np;
pthread_mutex_getprioceiling;
pthread_mutex_setprioceiling;
pthread_mutexattr_getprioceiling;
@@ -300,7 +306,6 @@ libpthread {
GLIBC_2.12 {
pthread_getname_np;
- pthread_mutex_consistent;
pthread_mutexattr_getrobust;
pthread_mutexattr_setrobust;
pthread_setname_np;
diff --git a/nptl/pthread_mutex_consistent.c b/nptl/pthread_mutex_consistent.c
index 937c7c4640..df4ba0019d 100644
--- a/nptl/pthread_mutex_consistent.c
+++ b/nptl/pthread_mutex_consistent.c
@@ -18,10 +18,10 @@
#include <errno.h>
#include <pthreadP.h>
-
+#include <shlib-compat.h>
int
-pthread_mutex_consistent (pthread_mutex_t *mutex)
+__pthread_mutex_consistent (pthread_mutex_t *mutex)
{
/* Test whether this is a robust mutex with a dead owner.
See concurrency notes regarding __kind in struct __pthread_mutex_s
@@ -35,4 +35,16 @@ pthread_mutex_consistent (pthread_mutex_t *mutex)
return 0;
}
-weak_alias (pthread_mutex_consistent, pthread_mutex_consistent_np)
+versioned_symbol (libc, __pthread_mutex_consistent, pthread_mutex_consistent,
+ GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_4, GLIBC_2_34)
+# undef pthread_mutex_consistent_np
+compat_symbol (libpthread, __pthread_mutex_consistent,
+ pthread_mutex_consistent_np, GLIBC_2_4);
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_mutex_consistent,
+ pthread_mutex_consistent, GLIBC_2_12);
+#endif