htl: move pthread_rwlock_unlock into libc.

Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20250216145434.7089-7-gfleury@disroot.org>
This commit is contained in:
gfleury 2025-02-16 16:54:30 +02:00 committed by Samuel Thibault
parent 18accc19b9
commit 119798a7b1
10 changed files with 16 additions and 10 deletions

View File

@ -51,7 +51,6 @@ libpthread-routines := \
pt-rwlock-wrlock \
pt-rwlock-timedrdlock \
pt-rwlock-timedwrlock \
pt-rwlock-unlock \
pt-hurd-cond-wait \
pt-hurd-cond-timedwait \
pt-stack-alloc \
@ -197,6 +196,7 @@ routines := \
pt-rwlock-attr \
pt-rwlock-tryrdlock \
pt-rwlock-trywrlock \
pt-rwlock-unlock \
pt-rwlockattr-destroy \
pt-rwlockattr-getpshared \
pt-rwlockattr-init \

View File

@ -65,6 +65,7 @@ libc {
pthread_mutexattr_settype;
pthread_rwlock_tryrdlock;
pthread_rwlock_trywrlock;
pthread_rwlock_unlock;
pthread_rwlockattr_destroy;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_init;
@ -150,6 +151,7 @@ libc {
pthread_mutex_trylock;
pthread_rwlock_tryrdlock;
pthread_rwlock_trywrlock;
pthread_rwlock_unlock;
pthread_rwlockattr_destroy;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_init;
@ -251,7 +253,7 @@ libpthread {
pthread_rwlock_destroy; pthread_rwlock_init; pthread_rwlock_rdlock;
pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock;
pthread_rwlock_unlock; pthread_rwlock_wrlock;
pthread_rwlock_wrlock;
pthread_setconcurrency;
pthread_setschedprio; pthread_setspecific;

View File

@ -32,7 +32,6 @@ static const struct pthread_functions pthread_functions = {
.ptr_pthread_once = __pthread_once,
.ptr_pthread_rwlock_rdlock = __pthread_rwlock_rdlock,
.ptr_pthread_rwlock_wrlock = __pthread_rwlock_wrlock,
.ptr_pthread_rwlock_unlock = __pthread_rwlock_unlock,
.ptr___pthread_key_create = __pthread_key_create,
.ptr___pthread_getspecific = __pthread_getspecific,
.ptr___pthread_setspecific = __pthread_setspecific,

View File

@ -106,6 +106,7 @@ extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_trywrlock)
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_unlock)
extern int __pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void));
@ -124,7 +125,6 @@ weak_extern (__pthread_rwlock_init)
weak_extern (__pthread_rwlock_destroy)
weak_extern (__pthread_rwlock_rdlock)
weak_extern (__pthread_rwlock_wrlock)
weak_extern (__pthread_rwlock_unlock)
weak_extern (__pthread_key_create)
weak_extern (__pthread_setspecific)
weak_extern (__pthread_getspecific)
@ -135,7 +135,6 @@ weak_extern (__pthread_atfork)
# pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_rwlock_rdlock
# pragma weak __pthread_rwlock_wrlock
# pragma weak __pthread_rwlock_unlock
# pragma weak __pthread_key_create
# pragma weak __pthread_setspecific
# pragma weak __pthread_getspecific

View File

@ -19,6 +19,7 @@
#include <pthread.h>
#include <pt-internal.h>
#include <shlib-compat.h>
/* Unlock *RWLOCK, rescheduling a waiting writer thread or, if there
are no threads waiting for a write lock, rescheduling the reader
@ -95,4 +96,9 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
__pthread_spin_unlock (&rwlock->__lock);
return 0;
}
weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock);
libc_hidden_def (__pthread_rwlock_unlock)
versioned_symbol (libc, __pthread_rwlock_unlock, pthread_rwlock_unlock, GLIBC_2_42);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
compat_symbol (libpthread, __pthread_rwlock_unlock, pthread_rwlock_unlock, GLIBC_2_12);
#endif

View File

@ -26,7 +26,6 @@ struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
int __pthread_once (pthread_once_t *, void (*) (void));
int __pthread_rwlock_rdlock (pthread_rwlock_t *);
int __pthread_rwlock_wrlock (pthread_rwlock_t *);
int __pthread_rwlock_unlock (pthread_rwlock_t *);
int __pthread_key_create (pthread_key_t *, void (*) (void *));
void *__pthread_getspecific (pthread_key_t);
int __pthread_setspecific (pthread_key_t, const void *);
@ -45,7 +44,6 @@ struct pthread_functions
int (*ptr_pthread_once) (pthread_once_t *, void (*) (void));
int (*ptr_pthread_rwlock_rdlock) (pthread_rwlock_t *);
int (*ptr_pthread_rwlock_wrlock) (pthread_rwlock_t *);
int (*ptr_pthread_rwlock_unlock) (pthread_rwlock_t *);
int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
void *(*ptr___pthread_getspecific) (pthread_key_t);
int (*ptr___pthread_setspecific) (pthread_key_t, const void *);

View File

@ -90,6 +90,7 @@ GLIBC_2.12 pthread_mutexattr_setpshared F
GLIBC_2.12 pthread_mutexattr_settype F
GLIBC_2.12 pthread_rwlock_tryrdlock F
GLIBC_2.12 pthread_rwlock_trywrlock F
GLIBC_2.12 pthread_rwlock_unlock F
GLIBC_2.12 pthread_rwlockattr_destroy F
GLIBC_2.12 pthread_rwlockattr_getpshared F
GLIBC_2.12 pthread_rwlockattr_init F
@ -2588,6 +2589,7 @@ GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlock_tryrdlock F
GLIBC_2.42 pthread_rwlock_trywrlock F
GLIBC_2.42 pthread_rwlock_unlock F
GLIBC_2.42 pthread_rwlockattr_destroy F
GLIBC_2.42 pthread_rwlockattr_getpshared F
GLIBC_2.42 pthread_rwlockattr_init F

View File

@ -41,7 +41,6 @@ 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
GLIBC_2.12 pthread_rwlock_unlock F
GLIBC_2.12 pthread_rwlock_wrlock F
GLIBC_2.12 pthread_setconcurrency F
GLIBC_2.12 pthread_setschedprio F

View File

@ -1581,6 +1581,7 @@ GLIBC_2.38 pthread_mutexattr_setrobust_np F
GLIBC_2.38 pthread_mutexattr_settype F
GLIBC_2.38 pthread_rwlock_tryrdlock F
GLIBC_2.38 pthread_rwlock_trywrlock F
GLIBC_2.38 pthread_rwlock_unlock F
GLIBC_2.38 pthread_rwlockattr_destroy F
GLIBC_2.38 pthread_rwlockattr_getpshared F
GLIBC_2.38 pthread_rwlockattr_init F
@ -2271,6 +2272,7 @@ GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlock_tryrdlock F
GLIBC_2.42 pthread_rwlock_trywrlock F
GLIBC_2.42 pthread_rwlock_unlock F
GLIBC_2.42 pthread_rwlockattr_destroy F
GLIBC_2.42 pthread_rwlockattr_getpshared F
GLIBC_2.42 pthread_rwlockattr_init F

View File

@ -63,7 +63,6 @@ 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
GLIBC_2.38 pthread_rwlock_unlock F
GLIBC_2.38 pthread_rwlock_wrlock F
GLIBC_2.38 pthread_setconcurrency F
GLIBC_2.38 pthread_setschedprio F