aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_rwlock_init.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:17:59 +0200
commit63627246f3e0aae274e04a8ef1edcd05a11afa65 (patch)
tree750eb0c67d5e9d1ee9680d36b6c0f0d946ad5c13 /nptl/pthread_rwlock_init.c
parent504ac633b0213b917a17a4aa98766154a1141925 (diff)
downloadglibc-63627246f3e0aae274e04a8ef1edcd05a11afa65.tar
glibc-63627246f3e0aae274e04a8ef1edcd05a11afa65.tar.gz
glibc-63627246f3e0aae274e04a8ef1edcd05a11afa65.tar.bz2
glibc-63627246f3e0aae274e04a8ef1edcd05a11afa65.zip
nptl: Move pthread_rwlock_init into libc
And __pthread_rwlock_init as a compatibility symbol. __libc_rwlock_init is changed to call __pthread_rwlock_init directly. 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_init.c')
-rw-r--r--nptl/pthread_rwlock_init.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/nptl/pthread_rwlock_init.c b/nptl/pthread_rwlock_init.c
index c7d8fef687..db8ebee504 100644
--- a/nptl/pthread_rwlock_init.c
+++ b/nptl/pthread_rwlock_init.c
@@ -19,7 +19,7 @@
#include "pthreadP.h"
#include <string.h>
#include <pthread-offsets.h>
-
+#include <shlib-compat.h>
static const struct pthread_rwlockattr default_rwlockattr =
{
@@ -30,7 +30,7 @@ static const struct pthread_rwlockattr default_rwlockattr =
/* See pthread_rwlock_common.c. */
int
-__pthread_rwlock_init (pthread_rwlock_t *rwlock,
+___pthread_rwlock_init (pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr)
{
ASSERT_TYPE_SIZE (pthread_rwlock_t, __SIZEOF_PTHREAD_RWLOCK_T);
@@ -55,4 +55,18 @@ __pthread_rwlock_init (pthread_rwlock_t *rwlock,
return 0;
}
-strong_alias (__pthread_rwlock_init, pthread_rwlock_init)
+versioned_symbol (libc, ___pthread_rwlock_init, pthread_rwlock_init,
+ GLIBC_2_34);
+libc_hidden_ver (___pthread_rwlock_init, __pthread_rwlock_init)
+#ifndef SHARED
+strong_alias (___pthread_rwlock_init, __pthread_rwlock_init)
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_init, pthread_rwlock_init,
+ GLIBC_2_1);
+#endif
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_rwlock_init, __pthread_rwlock_init,
+ GLIBC_2_2);
+#endif