[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd,commited 01/13] htl: move pthread_attr_destroy into libc.
From: |
Samuel Thibault |
Subject: |
[hurd,commited 01/13] htl: move pthread_attr_destroy into libc. |
Date: |
Tue, 19 Nov 2024 01:56:22 +0100 |
From: gfleury <gfleury@disroot.org>
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 | 2 --
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(+), 10 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile
index c5d1c473a0..bd1afe8009 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 \
@@ -199,6 +198,7 @@ routines := \
forward \
htlfreeres \
libc_pthread_init \
+ pt-attr-destroy \
pt-attr-getdetachstate \
pt-attr-getinheritsched \
pt-attr-getschedparam \
diff --git a/htl/Versions b/htl/Versions
index 949c1867fe..34b1f87a5f 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 ee89e50b3c..579e8cba4c 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 47b992fe06..0368bfa4c7 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 8b6814e447..3ad76fa365 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 f7b6fb7976..0a98d9f5d8 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 *);
@@ -64,7 +63,6 @@ int _cthreads_ftrylockfile (FILE *);
so if possible avoid breaking it and append new hooks to the end. */
struct pthread_functions
{
- int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
int (*ptr_pthread_attr_init) (pthread_attr_t *);
int (*ptr_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 dc2c6b505b..83c3218398 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 3ea7cb41fa..f8f5daf567 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 69999df5bb..54b3e34b9b 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.45.2
- [hurd,commited 00/13] htl: move pthread_attr_* into libc, Samuel Thibault, 2024/11/18
- [hurd,commited 01/13] htl: move pthread_attr_destroy into libc.,
Samuel Thibault <=
- [hurd,commited 04/13] htl move pthread_attr_getscope into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 02/13] htl: move __pthread_default_attr into libc, Samuel Thibault, 2024/11/18
- [hurd,commited 03/13] htl move pthread_attr_getguardsize into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 06/13] htl: move pthread_attr_getstackaddr into libc., Samuel Thibault, 2024/11/18
- [hurd, commited 11/13] htl: move pthread_attr_setschedparam into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 05/13] htl move pthread_attr_getstacksize into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 07/13] htl: move pthread_attr_getstack into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 08/13] htl: move pthread_attr_setstacksize into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 10/13] htl: move pthread_attr_setscope into libc., Samuel Thibault, 2024/11/18
- [hurd,commited 12/13] htl: move pthread_attr_setguardsize into libc., Samuel Thibault, 2024/11/18