about summary refs log tree commit diff
path: root/nptl/pthread_rwlock_tryrdlock.c
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:18:16 +0200
commitc96dddd7311e7ffa2a7995de5c2560d9979fd962 (patch)
tree0aebeb973544f89fd5cbb23e874cb8076b7b6f03 /nptl/pthread_rwlock_tryrdlock.c
parente7d2d48e560a2091e2a03c527c333cd7b5618b25 (diff)
downloadglibc-c96dddd7311e7ffa2a7995de5c2560d9979fd962.tar.gz
glibc-c96dddd7311e7ffa2a7995de5c2560d9979fd962.tar.xz
glibc-c96dddd7311e7ffa2a7995de5c2560d9979fd962.zip
nptl: Move pthread_rwlock_tryrdlock into libc
And __pthread_rwlock_tryrdlock as a compatibility symbol.

Remove the unused __libc_rwlock_tryrdlock macro.

The symbols were 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/pthread_rwlock_tryrdlock.c')
-rw-r--r--nptl/pthread_rwlock_tryrdlock.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c
index f01012f86a..495541fc78 100644
--- a/nptl/pthread_rwlock_tryrdlock.c
+++ b/nptl/pthread_rwlock_tryrdlock.c
@@ -25,7 +25,7 @@
 
 /* See pthread_rwlock_common.c for an overview.  */
 int
-__pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
+___pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
 {
   /* For tryrdlock, we could speculate that we will succeed and go ahead and
      register as a reader.  However, if we misspeculate, we have to do the
@@ -116,4 +116,15 @@ __pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
 
 
 }
-strong_alias (__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock)
+versioned_symbol (libc, ___pthread_rwlock_tryrdlock,
+		  pthread_rwlock_tryrdlock, GLIBC_2_34);
+libc_hidden_ver (___pthread_rwlock_tryrdlock, __pthread_rwlock_tryrdlock)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_tryrdlock,
+	       pthread_rwlock_tryrdlock, GLIBC_2_1);
+#endif
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_tryrdlock,
+	       __pthread_rwlock_tryrdlock, GLIBC_2_2);
+#endif