[PATCH 01/13] htl: move pthread_attr_destroy into libc.
gfleury
gfleury@disroot.org
Mon Nov 18 11:21:33 GMT 2024
Signed-off-by: gfleury <gfleury@disroot.org>
---
htl/Makefile | 2 +-
htl/Versions | 2 +-
htl/forward.c | 2 --
htl/pt-initialize.c | 1 -
sysdeps/htl/pt-attr-destroy.c | 7 ++++++-
sysdeps/htl/pthread-functions.h | 1 -
sysdeps/mach/hurd/i386/libc.abilist | 1 +
sysdeps/mach/hurd/i386/libpthread.abilist | 1 -
sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 -
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile
index c5d1c473..6058ffe9 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -26,7 +26,6 @@ LCLHDRS :=
libpthread-routines := \
pt-attr \
- pt-attr-destroy \
pt-attr-getguardsize \
pt-attr-getscope \
pt-attr-getstack \
@@ -211,6 +210,7 @@ routines := \
pt-pthread_self \
pt-self pt-equal \
pt-setschedparam \
+ pt-attr-destroy \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 949c1867..34b1f87a 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -13,6 +13,7 @@ libc {
pthread_equal;
pthread_getschedparam;
pthread_setschedparam;
+ pthread_attr_destroy;
}
GLIBC_2.21 {
@@ -77,7 +78,6 @@ libpthread {
pthread_atfork;
- pthread_attr_destroy;
pthread_attr_getguardsize;
pthread_attr_getscope; pthread_attr_getstack; pthread_attr_getstackaddr;
pthread_attr_getstacksize; pthread_attr_init;
diff --git a/htl/forward.c b/htl/forward.c
index ee89e50b..579e8cba 100644
--- a/htl/forward.c
+++ b/htl/forward.c
@@ -53,8 +53,6 @@ name decl \
#define FORWARD(name, decl, params, defretval) \
FORWARD2 (name, int, decl, params, return defretval)
-FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0)
-
FORWARD (pthread_attr_init, (pthread_attr_t *attr), (attr), 0)
FORWARD (pthread_attr_setschedparam,
diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c
index 47b992fe..0368bfa4 100644
--- a/htl/pt-initialize.c
+++ b/htl/pt-initialize.c
@@ -27,7 +27,6 @@
#if IS_IN (libpthread)
static const struct pthread_functions pthread_functions = {
- .ptr_pthread_attr_destroy = __pthread_attr_destroy,
.ptr_pthread_attr_init = __pthread_attr_init,
.ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam,
.ptr_pthread_attr_getscope = __pthread_attr_getscope,
diff --git a/sysdeps/htl/pt-attr-destroy.c b/sysdeps/htl/pt-attr-destroy.c
index 8b6814e4..3ad76fa3 100644
--- a/sysdeps/htl/pt-attr-destroy.c
+++ b/sysdeps/htl/pt-attr-destroy.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
+#include <shlib-compat.h>
#include <pt-internal.h>
int
@@ -24,4 +25,8 @@ __pthread_attr_destroy (pthread_attr_t *attr)
{
return 0;
}
-weak_alias (__pthread_attr_destroy, pthread_attr_destroy);
+versioned_symbol (libc, __pthread_attr_destroy, pthread_attr_destroy, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_destroy, pthread_attr_destroy, GLIBC_2_12);
+#endif
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index f7b6fb79..9cea6d05 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -21,7 +21,6 @@
#include <pthread.h>
-int __pthread_attr_destroy (pthread_attr_t *);
int __pthread_attr_init (pthread_attr_t *);
int __pthread_attr_setschedparam (pthread_attr_t *,
const struct sched_param *);
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index dc2c6b50..83c32183 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -29,6 +29,7 @@ GLIBC_2.11 mkostemps64 F
GLIBC_2.11 mkstemps F
GLIBC_2.11 mkstemps64 F
GLIBC_2.12 __pthread_self F
+GLIBC_2.12 pthread_attr_destroy F
GLIBC_2.12 pthread_attr_getdetachstate F
GLIBC_2.12 pthread_attr_getinheritsched F
GLIBC_2.12 pthread_attr_getschedparam F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 3ea7cb41..f8f5daf5 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -22,7 +22,6 @@ GLIBC_2.12 flockfile F
GLIBC_2.12 ftrylockfile F
GLIBC_2.12 funlockfile F
GLIBC_2.12 pthread_atfork F
-GLIBC_2.12 pthread_attr_destroy F
GLIBC_2.12 pthread_attr_getguardsize F
GLIBC_2.12 pthread_attr_getscope F
GLIBC_2.12 pthread_attr_getstack F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 69999df5..54b3e34b 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -39,7 +39,6 @@ GLIBC_2.38 mtx_lock F
GLIBC_2.38 mtx_timedlock F
GLIBC_2.38 mtx_trylock F
GLIBC_2.38 mtx_unlock F
-GLIBC_2.38 pthread_attr_destroy F
GLIBC_2.38 pthread_attr_getguardsize F
GLIBC_2.38 pthread_attr_getscope F
GLIBC_2.38 pthread_attr_getstack F
--
2.39.5
More information about the Libc-alpha
mailing list