[v2 06/10] htl: move pthread_rwlock_unlock into libc.
gfleury
gfleury@disroot.org
Sun Feb 16 14:54:30 GMT 2025
Signed-off-by: gfleury <gfleury@disroot.org>
---
htl/Makefile | 2 +-
htl/Versions | 3 ++-
htl/pt-initialize.c | 1 -
sysdeps/htl/libc-lockP.h | 3 +--
sysdeps/htl/pt-rwlock-unlock.c | 1 +
sysdeps/htl/pthread-functions.h | 2 --
sysdeps/mach/hurd/i386/libc.abilist | 1 +
sysdeps/mach/hurd/i386/libpthread.abilist | 1 -
sysdeps/mach/hurd/x86_64/libc.abilist | 1 +
sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 -
10 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile
index 0c85ab46..d5ab98c8 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -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 \
diff --git a/htl/Versions b/htl/Versions
index ca59cd5c..dff7fd9f 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -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;
@@ -251,7 +252,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;
diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c
index 53b9c76e..14172099 100644
--- a/htl/pt-initialize.c
+++ b/htl/pt-initialize.c
@@ -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,
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h
index 5fad451d..7e9bdd1c 100644
--- a/sysdeps/htl/libc-lockP.h
+++ b/sysdeps/htl/libc-lockP.h
@@ -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
diff --git a/sysdeps/htl/pt-rwlock-unlock.c b/sysdeps/htl/pt-rwlock-unlock.c
index 6465ace7..c41eb935 100644
--- a/sysdeps/htl/pt-rwlock-unlock.c
+++ b/sysdeps/htl/pt-rwlock-unlock.c
@@ -95,4 +95,5 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
__pthread_spin_unlock (&rwlock->__lock);
return 0;
}
+libc_hidden_def (__pthread_rwlock_unlock)
weak_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock);
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index 56b5b238..7dd6fadc 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -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 *);
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 3d786282..2709614e 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 70db951b..8ba641f6 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index 305cdb8c..2b8c01fc 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -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
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index b712a1b3..cd08c5f9 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -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
--
2.39.5
More information about the Libc-alpha
mailing list