aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-02-16 16:54:28 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-02-16 22:59:25 +0100
commit4b25413df5127b7ff7fb3903bf8acb8a64743db4 (patch)
treec53dffdfe81967695a225ee95ecb327b34a44d6e /sysdeps/htl
parentcd2d31ed58542adc0869ca17c88a45f41117db8b (diff)
downloadglibc-4b25413df5127b7ff7fb3903bf8acb8a64743db4.tar.xz
glibc-4b25413df5127b7ff7fb3903bf8acb8a64743db4.zip
htl: move pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared into libc.
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-5-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/htl')
-rw-r--r--sysdeps/htl/pt-rwlockattr-getpshared.c9
-rw-r--r--sysdeps/htl/pt-rwlockattr-setpshared.c9
-rw-r--r--sysdeps/htl/pthreadP.h6
3 files changed, 22 insertions, 2 deletions
diff --git a/sysdeps/htl/pt-rwlockattr-getpshared.c b/sysdeps/htl/pt-rwlockattr-getpshared.c
index 9e57d39c41..15470ada09 100644
--- a/sysdeps/htl/pt-rwlockattr-getpshared.c
+++ b/sysdeps/htl/pt-rwlockattr-getpshared.c
@@ -18,10 +18,17 @@
#include <pthread.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
int
-pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared)
+__pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared)
{
*pshared = attr->__pshared;
return 0;
}
+libc_hidden_def (__pthread_rwlockattr_getpshared)
+versioned_symbol (libc, __pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared, GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared, GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pt-rwlockattr-setpshared.c b/sysdeps/htl/pt-rwlockattr-setpshared.c
index 94fdf761c0..e23a032d4a 100644
--- a/sysdeps/htl/pt-rwlockattr-setpshared.c
+++ b/sysdeps/htl/pt-rwlockattr-setpshared.c
@@ -18,9 +18,10 @@
#include <pthread.h>
#include <pt-internal.h>
+#include <shlib-compat.h>
int
-pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
+__pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
{
switch (pshared)
{
@@ -35,4 +36,10 @@ pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
return EINVAL;
}
}
+libc_hidden_def (__pthread_rwlockattr_setpshared)
+versioned_symbol (libc, __pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared, GLIBC_2_42);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libpthread, __pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared, GLIBC_2_12);
+#endif
stub_warning (pthread_rwlockattr_setpshared)
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 0f22c85d41..d77cee51a5 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -116,8 +116,14 @@ extern int __pthread_mutexattr_settype(pthread_mutexattr_t *__attr,
libc_hidden_proto (__pthread_mutexattr_settype)
extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
libc_hidden_proto (__pthread_rwlockattr_destroy)
+extern int __pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *__attr,
+ int *__pshared);
+libc_hidden_proto (__pthread_rwlockattr_getpshared)
extern int __pthread_rwlockattr_init (pthread_rwlockattr_t *__attr);
libc_hidden_proto (__pthread_rwlockattr_init)
+extern int __pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
+ int __pshared);
+libc_hidden_proto (__pthread_rwlockattr_setpshared)
extern int __pthread_cond_init (pthread_cond_t *cond,
const pthread_condattr_t *cond_attr);