From e618b671cdac1e98632ec9db439a585a55739e4b Mon Sep 17 00:00:00 2001 From: gfleury Date: Sun, 16 Feb 2025 16:54:26 +0200 Subject: htl: move pthread_rwlockattr_init into libc. Signed-off-by: gfleury Message-ID: <20250216145434.7089-3-gfleury@disroot.org> --- sysdeps/htl/pt-rwlockattr-init.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'sysdeps/htl') diff --git a/sysdeps/htl/pt-rwlockattr-init.c b/sysdeps/htl/pt-rwlockattr-init.c index 04a3ca62be..ce3f3c655d 100644 --- a/sysdeps/htl/pt-rwlockattr-init.c +++ b/sysdeps/htl/pt-rwlockattr-init.c @@ -18,12 +18,19 @@ #include #include +#include int -pthread_rwlockattr_init (pthread_rwlockattr_t *attr) +__pthread_rwlockattr_init (pthread_rwlockattr_t *attr) { ASSERT_TYPE_SIZE (pthread_rwlockattr_t, __SIZEOF_PTHREAD_RWLOCKATTR_T); *attr = __pthread_default_rwlockattr; return 0; } +libc_hidden_def (__pthread_rwlockattr_init) +versioned_symbol (libc, __pthread_rwlockattr_init, pthread_rwlockattr_init, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_rwlockattr_init, pthread_rwlockattr_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 9ded2f8576..2f779d27cc 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -114,6 +114,8 @@ libc_hidden_proto (__pthread_mutexattr_gettype) extern int __pthread_mutexattr_settype(pthread_mutexattr_t *__attr, int __type); libc_hidden_proto (__pthread_mutexattr_settype) +extern int __pthread_rwlockattr_init (pthread_rwlockattr_t *__attr); +libc_hidden_proto (__pthread_rwlockattr_init) extern int __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr); -- cgit v1.2.3