aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-02-16 16:54:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-02-16 23:42:38 +0100
commitd3ef1b56aa81d7f86ebf04c849258f0cf85c4217 (patch)
treed07bdebd5b36b4231e9de9cbc875c30b3b218ff2 /sysdeps/htl
parent25650ef6b9606dcfe3112d4a662ae44f55f5568c (diff)
downloadglibc-d3ef1b56aa81d7f86ebf04c849258f0cf85c4217.tar.xz
glibc-d3ef1b56aa81d7f86ebf04c849258f0cf85c4217.zip
htl: move pthread_rwlock_destroy into libc.
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-9-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/htl')
-rw-r--r--sysdeps/htl/libc-lockP.h3
-rw-r--r--sysdeps/htl/pt-rwlock-destroy.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h
index ae2e4668bb..1b5c23ebac 100644
--- a/sysdeps/htl/libc-lockP.h
+++ b/sysdeps/htl/libc-lockP.h
@@ -94,6 +94,7 @@ extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
const pthread_rwlockattr_t *__attr);
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
+libc_hidden_proto (__pthread_rwlock_destroy)
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_rdlock)
@@ -124,7 +125,6 @@ libc_hidden_proto (__pthread_setcancelstate)
#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
# ifdef weak_extern
weak_extern (__pthread_rwlock_init)
-weak_extern (__pthread_rwlock_destroy)
weak_extern (__pthread_key_create)
weak_extern (__pthread_setspecific)
weak_extern (__pthread_getspecific)
@@ -132,7 +132,6 @@ weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
# else
-# pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_key_create
# pragma weak __pthread_setspecific
# pragma weak __pthread_getspecific
diff --git a/sysdeps/htl/pt-rwlock-destroy.c b/sysdeps/htl/pt-rwlock-destroy.c
index 0f862c89a2..ffdd3c0187 100644
--- a/sysdeps/htl/pt-rwlock-destroy.c
+++ b/sysdeps/htl/pt-rwlock-destroy.c
@@ -18,11 +18,16 @@
#include <pthread.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
int
-_pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
+__pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
{
return 0;
}
+libc_hidden_def (__pthread_rwlock_destroy)
+versioned_symbol (libc, __pthread_rwlock_destroy, pthread_rwlock_destroy, GLIBC_2_42);
-strong_alias (_pthread_rwlock_destroy, pthread_rwlock_destroy);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_rwlock_destroy, pthread_rwlock_destroy, GLIBC_2_12);
+#endif