about summary refs log tree commit diff
path: root/nptl/pthread_rwlock_unlock.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
commiteb29dcde31e7b6f07e7acda161e85d2be69652e4 (patch)
tree763b41f1d40d74c8ae84d3c2622ef5709644b820 /nptl/pthread_rwlock_unlock.c
parent9ce44f46754cc529d54418615862e7e27cc82f09 (diff)
downloadglibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.tar.gz
glibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.tar.xz
glibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.zip
nptl: Move rwlock functions with forwarders into libc
The forwarders were only used internally, so new symbol versions
are needed.  All symbols are moved at once because the forwarders
are no-ops if libpthread is not loaded, leading to inconsistencies
in case of a partial migration.

The symbols __pthread_rwlock_rdlock, __pthread_rwlock_unlock,
__pthread_rwlock_wrlock, pthread_rwlock_rdlock,
pthread_rwlock_unlock, pthread_rwlock_wrlock have been moved using
scripts/move-symbol-to-libc.py.

The __ symbol variants are turned into compat symbols, which is why they
do not receive a GLIBC_2.34 version.
Diffstat (limited to 'nptl/pthread_rwlock_unlock.c')
-rw-r--r--nptl/pthread_rwlock_unlock.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c
index 356d63a045..6c0da9786d 100644
--- a/nptl/pthread_rwlock_unlock.c
+++ b/nptl/pthread_rwlock_unlock.c
@@ -27,7 +27,7 @@
 
 /* See pthread_rwlock_common.c for an overview.  */
 int
-__pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
+___pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 {
   LIBC_PROBE (rwlock_unlock, 1, rwlock);
 
@@ -43,6 +43,16 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
     __pthread_rwlock_rdunlock (rwlock);
   return 0;
 }
-
-weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock)
-hidden_def (__pthread_rwlock_unlock)
+versioned_symbol (libc, ___pthread_rwlock_unlock, pthread_rwlock_unlock,
+		  GLIBC_2_34);
+strong_alias (___pthread_rwlock_unlock, __pthread_rwlock_unlock)
+libc_hidden_ver (___pthread_rwlock_unlock, __pthread_rwlock_unlock)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_unlock, pthread_rwlock_unlock,
+	       GLIBC_2_1);
+#endif
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_unlock, __pthread_rwlock_unlock,
+	       GLIBC_2_2);
+#endif