about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-03 09:10:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-03 09:16:49 +0200
commit0ace9b197c454166808e466b931a0f827a7b785c (patch)
tree49075ef16d1c3e171d3abfb754ddd8715cad37d2 /nptl
parent2c5c5c87c981fd68e7f646db0d479311e820c2f7 (diff)
downloadglibc-0ace9b197c454166808e466b931a0f827a7b785c.tar.gz
glibc-0ace9b197c454166808e466b931a0f827a7b785c.tar.xz
glibc-0ace9b197c454166808e466b931a0f827a7b785c.zip
nptl: Move pthread_rwlock_clockrdlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions3
-rw-r--r--nptl/pthreadP.h2
-rw-r--r--nptl/pthread_rwlock_clockrdlock.c23
4 files changed, 20 insertions, 10 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 51d6eb5bc7..e796a68864 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -120,6 +120,7 @@ routines = \
   pthread_mutexattr_setrobust \
   pthread_mutexattr_settype \
   pthread_once \
+  pthread_rwlock_clockrdlock \
   pthread_rwlock_rdlock \
   pthread_rwlock_unlock \
   pthread_rwlock_wrlock \
@@ -178,7 +179,6 @@ libpthread-routines = \
   pthread_getname \
   pthread_join \
   pthread_join_common \
-  pthread_rwlock_clockrdlock \
   pthread_rwlock_clockwrlock \
   pthread_rwlock_destroy \
   pthread_rwlock_init \
diff --git a/nptl/Versions b/nptl/Versions
index bd3bc81cb0..ea5dd92882 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -152,6 +152,7 @@ libc {
   GLIBC_2.30 {
     pthread_cond_clockwait;
     pthread_mutex_clocklock;
+    pthread_rwlock_clockrdlock;
   }
   GLIBC_2.32 {
     pthread_attr_getsigmask_np;
@@ -204,6 +205,7 @@ libc {
     pthread_mutexattr_setrobust;
     pthread_mutexattr_settype;
     pthread_once;
+    pthread_rwlock_clockrdlock;
     pthread_rwlock_rdlock;
     pthread_rwlock_unlock;
     pthread_rwlock_wrlock;
@@ -399,7 +401,6 @@ libpthread {
   }
 
   GLIBC_2.30 {
-    pthread_rwlock_clockrdlock;
     pthread_rwlock_clockwrlock;
     sem_clockwait;
   }
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index d98bd11d6e..6c50736684 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -505,7 +505,7 @@ libc_hidden_proto (__pthread_cond_clockwait64)
 extern int __pthread_rwlock_clockrdlock64 (pthread_rwlock_t *rwlock,
                                            clockid_t clockid,
                                            const struct __timespec64 *abstime);
-libpthread_hidden_proto (__pthread_rwlock_clockrdlock64)
+libc_hidden_proto (__pthread_rwlock_clockrdlock64)
 extern int __pthread_rwlock_clockwrlock64 (pthread_rwlock_t *rwlock,
                                            clockid_t clockid,
                                            const struct __timespec64 *abstime);
diff --git a/nptl/pthread_rwlock_clockrdlock.c b/nptl/pthread_rwlock_clockrdlock.c
index 6c8e50a6b3..9db96b9904 100644
--- a/nptl/pthread_rwlock_clockrdlock.c
+++ b/nptl/pthread_rwlock_clockrdlock.c
@@ -18,25 +18,34 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include "pthread_rwlock_common.c"
+#include <shlib-compat.h>
 
 /* See pthread_rwlock_common.c.  */
 int
-__pthread_rwlock_clockrdlock64 (pthread_rwlock_t *rwlock, clockid_t clockid,
-                                const struct __timespec64 *abstime)
+___pthread_rwlock_clockrdlock64 (pthread_rwlock_t *rwlock, clockid_t clockid,
+				 const struct __timespec64 *abstime)
 {
   return __pthread_rwlock_rdlock_full64 (rwlock, clockid, abstime);
 }
 
-#if __TIMESIZE != 64
-libpthread_hidden_def (__pthread_rwlock_clockrdlock64)
+#if __TIMESIZE == 64
+strong_alias (___pthread_rwlock_clockrdlock64, ___pthread_rwlock_clockrdlock)
+#else /* __TIMESPEC64 != 64 */
+libc_hidden_ver (___pthread_rwlock_clockrdlock64,
+		 __pthread_rwlock_clockrdlock64)
 
 int
-__pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid,
-                              const struct timespec *abstime)
+___pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid,
+			       const struct timespec *abstime)
 {
   struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime);
 
   return __pthread_rwlock_clockrdlock64 (rwlock, clockid, &ts64);
 }
+#endif /* __TIMESPEC64 != 64 */
+versioned_symbol (libc, ___pthread_rwlock_clockrdlock,
+		  pthread_rwlock_clockrdlock, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_clockrdlock,
+	       pthread_rwlock_clockrdlock, GLIBC_2_30);
 #endif
-weak_alias (__pthread_rwlock_clockrdlock, pthread_rwlock_clockrdlock)