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>
This commit is contained in:
gfleury 2025-02-16 16:54:28 +02:00 committed by Samuel Thibault
parent cd2d31ed58
commit 4b25413df5
9 changed files with 36 additions and 11 deletions

View File

@ -45,8 +45,6 @@ libpthread-routines := \
pt-testcancel \
pt-cancel \
pt-mutex-transfer-np \
pt-rwlockattr-getpshared \
pt-rwlockattr-setpshared \
pt-rwlock-init \
pt-rwlock-destroy \
pt-rwlock-rdlock \
@ -200,7 +198,9 @@ routines := \
pt-pthread_self \
pt-rwlock-attr \
pt-rwlockattr-destroy \
pt-rwlockattr-getpshared \
pt-rwlockattr-init \
pt-rwlockattr-setpshared \
pt-self pt-equal \
pt-setcancelstate \
pt-setcanceltype \

View File

@ -64,7 +64,9 @@ libc {
pthread_mutexattr_setpshared;
pthread_mutexattr_settype;
pthread_rwlockattr_destroy;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_init;
pthread_rwlockattr_setpshared;
pthread_setcancelstate;
pthread_setcanceltype;
pthread_sigmask;
@ -145,7 +147,9 @@ libc {
pthread_mutex_setprioceiling;
pthread_mutex_trylock;
pthread_rwlockattr_destroy;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_init;
pthread_rwlockattr_setpshared;
}
GLIBC_PRIVATE {
@ -246,9 +250,6 @@ libpthread {
pthread_rwlock_tryrdlock; pthread_rwlock_trywrlock;
pthread_rwlock_unlock; pthread_rwlock_wrlock;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_setpshared;
pthread_setconcurrency;
pthread_setschedprio; pthread_setspecific;

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -89,7 +89,9 @@ 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_rwlockattr_destroy F
GLIBC_2.12 pthread_rwlockattr_getpshared F
GLIBC_2.12 pthread_rwlockattr_init F
GLIBC_2.12 pthread_rwlockattr_setpshared F
GLIBC_2.12 pthread_self F
GLIBC_2.12 pthread_setcancelstate F
GLIBC_2.12 pthread_setcanceltype F
@ -2583,7 +2585,9 @@ GLIBC_2.42 pthread_mutex_getprioceiling F
GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlockattr_destroy F
GLIBC_2.42 pthread_rwlockattr_getpshared F
GLIBC_2.42 pthread_rwlockattr_init F
GLIBC_2.42 pthread_rwlockattr_setpshared F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F

View File

@ -45,8 +45,6 @@ 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_rwlock_wrlock F
GLIBC_2.12 pthread_rwlockattr_getpshared F
GLIBC_2.12 pthread_rwlockattr_setpshared F
GLIBC_2.12 pthread_setconcurrency F
GLIBC_2.12 pthread_setschedprio F
GLIBC_2.12 pthread_setspecific F

View File

@ -1580,7 +1580,9 @@ GLIBC_2.38 pthread_mutexattr_setrobust F
GLIBC_2.38 pthread_mutexattr_setrobust_np F
GLIBC_2.38 pthread_mutexattr_settype F
GLIBC_2.38 pthread_rwlockattr_destroy F
GLIBC_2.38 pthread_rwlockattr_getpshared F
GLIBC_2.38 pthread_rwlockattr_init F
GLIBC_2.38 pthread_rwlockattr_setpshared F
GLIBC_2.38 pthread_self F
GLIBC_2.38 pthread_setcancelstate F
GLIBC_2.38 pthread_setcanceltype F
@ -2266,7 +2268,9 @@ GLIBC_2.42 pthread_mutex_getprioceiling F
GLIBC_2.42 pthread_mutex_setprioceiling F
GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.42 pthread_rwlockattr_destroy F
GLIBC_2.42 pthread_rwlockattr_getpshared F
GLIBC_2.42 pthread_rwlockattr_init F
GLIBC_2.42 pthread_rwlockattr_setpshared F
HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F
HURD_CTHREADS_0.3 __cthread_setspecific F

View File

@ -67,8 +67,6 @@ 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_rwlock_wrlock F
GLIBC_2.38 pthread_rwlockattr_getpshared F
GLIBC_2.38 pthread_rwlockattr_setpshared F
GLIBC_2.38 pthread_setconcurrency F
GLIBC_2.38 pthread_setschedprio F
GLIBC_2.38 pthread_setspecific F