about summary refs log tree commit diff
path: root/nptl/pthread_mutex_consistent.c
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/pthread_mutex_consistent.c
parent2208066603a136f95cfb815ca9281262e6465784 (diff)
downloadglibc-f03b78fae46905a5676c7b7f360cadba2f290708.tar.gz
glibc-f03b78fae46905a5676c7b7f360cadba2f290708.tar.xz
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/pthread_mutex_consistent.c')
-rw-r--r--nptl/pthread_mutex_consistent.c18
1 files changed, 15 insertions, 3 deletions
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