htl: move pthread_rwlock_init into libc.

Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20250216145434.7089-10-gfleury@disroot.org>
This commit is contained in:
gfleury 2025-02-16 16:54:33 +02:00 committed by Samuel Thibault
parent d3ef1b56aa
commit 6f6732c1c4
8 changed files with 15 additions and 9 deletions

View File

@ -45,7 +45,6 @@ libpthread-routines := \
pt-testcancel \
pt-cancel \
pt-mutex-transfer-np \
pt-rwlock-init \
pt-hurd-cond-wait \
pt-hurd-cond-timedwait \
pt-stack-alloc \
@ -190,6 +189,7 @@ routines := \
pt-pthread_self \
pt-rwlock-attr \
pt-rwlock-destroy \
pt-rwlock-init \
pt-rwlock-rdlock \
pt-rwlock-timedrdlock \
pt-rwlock-timedwrlock \

View File

@ -64,6 +64,7 @@ libc {
pthread_mutexattr_setpshared;
pthread_mutexattr_settype;
pthread_rwlock_destroy;
pthread_rwlock_init;
pthread_rwlock_rdlock;
pthread_rwlock_timedrdlock;
pthread_rwlock_timedwrlock;
@ -159,6 +160,7 @@ libc {
pthread_mutex_trylock;
pthread_rwlock_clockrdlock;
pthread_rwlock_clockwrlock;
pthread_rwlock_init;
pthread_rwlock_rdlock;
pthread_rwlock_timedrdlock;
pthread_rwlock_timedwrlock;
@ -265,8 +267,6 @@ libpthread {
pthread_once;
pthread_rwlock_init;
pthread_setconcurrency;
pthread_setschedprio; pthread_setspecific;
@ -320,6 +320,5 @@ libpthread {
__pthread_getattr_np;
__pthread_enable_asynccancel;
__pthread_disable_asynccancel;
_pthread_rwlock_init;
}
}

View File

@ -92,6 +92,7 @@ libc_hidden_proto (__pthread_mutexattr_destroy)
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
const pthread_rwlockattr_t *__attr);
libc_hidden_proto (__pthread_rwlock_init)
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_destroy)
@ -124,7 +125,6 @@ libc_hidden_proto (__pthread_setcancelstate)
single-threaded processes. */
#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
# ifdef weak_extern
weak_extern (__pthread_rwlock_init)
weak_extern (__pthread_key_create)
weak_extern (__pthread_setspecific)
weak_extern (__pthread_getspecific)

View File

@ -19,9 +19,10 @@
#include <pthread.h>
#include <string.h>
#include <pt-internal.h>
#include <shlib-compat.h>
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);
@ -42,5 +43,9 @@ _pthread_rwlock_init (pthread_rwlock_t *rwlock,
*rwlock->__attr = *attr;
return 0;
}
libc_hidden_def (__pthread_rwlock_init)
versioned_symbol (libc, __pthread_rwlock_init, pthread_rwlock_init, GLIBC_2_42);
strong_alias (_pthread_rwlock_init, pthread_rwlock_init);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
compat_symbol (libpthread, __pthread_rwlock_init, pthread_rwlock_init, GLIBC_2_12);
#endif

View File

@ -89,6 +89,7 @@ GLIBC_2.12 pthread_mutexattr_setprotocol F
GLIBC_2.12 pthread_mutexattr_setpshared F
GLIBC_2.12 pthread_mutexattr_settype F
GLIBC_2.12 pthread_rwlock_destroy F
GLIBC_2.12 pthread_rwlock_init F
GLIBC_2.12 pthread_rwlock_rdlock F
GLIBC_2.12 pthread_rwlock_timedrdlock F
GLIBC_2.12 pthread_rwlock_timedwrlock F
@ -2597,6 +2598,7 @@ GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlock_clockrdlock F
GLIBC_2.42 pthread_rwlock_clockwrlock F
GLIBC_2.42 pthread_rwlock_destroy F
GLIBC_2.42 pthread_rwlock_init F
GLIBC_2.42 pthread_rwlock_rdlock F
GLIBC_2.42 pthread_rwlock_timedrdlock F
GLIBC_2.42 pthread_rwlock_timedwrlock F

View File

@ -36,7 +36,6 @@ GLIBC_2.12 pthread_key_delete F
GLIBC_2.12 pthread_kill F
GLIBC_2.12 pthread_mutex_transfer_np F
GLIBC_2.12 pthread_once F
GLIBC_2.12 pthread_rwlock_init F
GLIBC_2.12 pthread_setconcurrency F
GLIBC_2.12 pthread_setschedprio F
GLIBC_2.12 pthread_setspecific F

View File

@ -1582,6 +1582,7 @@ GLIBC_2.38 pthread_mutexattr_settype F
GLIBC_2.38 pthread_rwlock_clockrdlock F
GLIBC_2.38 pthread_rwlock_clockwrlock F
GLIBC_2.38 pthread_rwlock_destroy F
GLIBC_2.38 pthread_rwlock_init F
GLIBC_2.38 pthread_rwlock_rdlock F
GLIBC_2.38 pthread_rwlock_timedrdlock F
GLIBC_2.38 pthread_rwlock_timedwrlock F
@ -2280,6 +2281,7 @@ GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlock_clockrdlock F
GLIBC_2.42 pthread_rwlock_clockwrlock F
GLIBC_2.42 pthread_rwlock_destroy F
GLIBC_2.42 pthread_rwlock_init F
GLIBC_2.42 pthread_rwlock_rdlock F
GLIBC_2.42 pthread_rwlock_timedrdlock F
GLIBC_2.42 pthread_rwlock_timedwrlock F

View File

@ -56,7 +56,6 @@ GLIBC_2.38 pthread_key_delete F
GLIBC_2.38 pthread_kill F
GLIBC_2.38 pthread_mutex_transfer_np F
GLIBC_2.38 pthread_once F
GLIBC_2.38 pthread_rwlock_init F
GLIBC_2.38 pthread_setconcurrency F
GLIBC_2.38 pthread_setschedprio F
GLIBC_2.38 pthread_setspecific F