[PATCH 12/13] htl: move pthread_attr_setguardsize into libc.
gfleury
gfleury@disroot.org
Mon Nov 18 11:21:44 GMT 2024
Signed-off-by: gfleury <gfleury@disroot.org>
---
htl/Makefile | 2 +-
htl/Versions | 2 +-
sysdeps/htl/pt-attr-setguardsize.c | 8 +++++++-
sysdeps/mach/hurd/i386/libc.abilist | 2 ++
sysdeps/mach/hurd/i386/libpthread.abilist | 1 -
sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++
sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 -
7 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/htl/Makefile b/htl/Makefile
index 20232f9e..94c4ed1b 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -26,7 +26,6 @@ LCLHDRS :=
libpthread-routines := \
pt-attr-init \
- pt-attr-setguardsize \
pt-barrier-destroy \
pt-barrier-init \
pt-barrier-wait \
@@ -211,6 +210,7 @@ routines := \
pt-attr-setstack \
pt-attr-setscope \
pt-attr-setschedparam \
+ pt-attr-setguardsize \
# routines
shared-only-routines = forward
diff --git a/htl/Versions b/htl/Versions
index 8ecb2fd8..24d96647 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -61,6 +61,7 @@ libc {
pthread_attr_setstacksize;
pthread_attr_setstackaddr;
pthread_attr_setstack;
+ pthread_attr_setguardsize;
}
@@ -107,7 +108,6 @@ libpthread {
pthread_atfork;
pthread_attr_init;
- pthread_attr_setguardsize;
pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait;
pthread_barrierattr_destroy; pthread_barrierattr_getpshared;
diff --git a/sysdeps/htl/pt-attr-setguardsize.c b/sysdeps/htl/pt-attr-setguardsize.c
index 50a9a9a7..92cd2b58 100644
--- a/sysdeps/htl/pt-attr-setguardsize.c
+++ b/sysdeps/htl/pt-attr-setguardsize.c
@@ -17,11 +17,17 @@
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
+#include <shlib-compat.h>
#include <pt-internal.h>
int
-pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize)
+__pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize)
{
attr->__guardsize = guardsize;
return 0;
}
+versioned_symbol (libpthread, __pthread_attr_setguardsize, pthread_attr_setguardsize, GLIBC_2_41);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41)
+compat_symbol (libpthread, __pthread_attr_setguardsize, pthread_attr_setguardsize, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index c448e757..52293d74 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -40,6 +40,7 @@ GLIBC_2.12 pthread_attr_getstack F
GLIBC_2.12 pthread_attr_getstackaddr F
GLIBC_2.12 pthread_attr_getstacksize F
GLIBC_2.12 pthread_attr_setdetachstate F
+GLIBC_2.12 pthread_attr_setguardsize F
GLIBC_2.12 pthread_attr_setinheritsched F
GLIBC_2.12 pthread_attr_setschedpolicy F
GLIBC_2.12 pthread_attr_setschedparam F
@@ -2100,6 +2101,7 @@ GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F
GLIBC_2.41 pthread_attr_getstacksize F
+GLIBC_2.41 pthread_attr_setguardsize F
GLIBC_2.41 pthread_attr_setstack F
GLIBC_2.41 pthread_attr_setstackaddr F
GLIBC_2.41 pthread_attr_setstacksize F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index ea40657e..86d79bbc 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -23,7 +23,6 @@ GLIBC_2.12 ftrylockfile F
GLIBC_2.12 funlockfile F
GLIBC_2.12 pthread_atfork F
GLIBC_2.12 pthread_attr_init F
-GLIBC_2.12 pthread_attr_setguardsize F
GLIBC_2.12 pthread_barrier_destroy F
GLIBC_2.12 pthread_barrier_init F
GLIBC_2.12 pthread_barrier_wait F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index c4e35fde..e38d5c66 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1526,6 +1526,7 @@ GLIBC_2.38 pthread_attr_getstacksize F
GLIBC_2.38 pthread_attr_setstacksize F
GLIBC_2.38 pthread_attr_init F
GLIBC_2.38 pthread_attr_setdetachstate F
+GLIBC_2.38 pthread_attr_setguardsize F
GLIBC_2.38 pthread_attr_setinheritsched F
GLIBC_2.38 pthread_attr_setschedparam F
GLIBC_2.38 pthread_attr_setschedpolicy F
@@ -2195,6 +2196,7 @@ GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F
GLIBC_2.41 pthread_attr_getstacksize F
+GLIBC_2.41 pthread_attr_setguardsize F
GLIBC_2.41 pthread_attr_setstack F
GLIBC_2.41 pthread_attr_setstackaddr F
GLIBC_2.41 pthread_attr_setstacksize F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index eef91700..9e156b16 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -40,7 +40,6 @@ GLIBC_2.38 mtx_timedlock F
GLIBC_2.38 mtx_trylock F
GLIBC_2.38 mtx_unlock F
GLIBC_2.38 pthread_attr_init F
-GLIBC_2.38 pthread_attr_setguardsize F
GLIBC_2.38 pthread_barrier_destroy F
GLIBC_2.38 pthread_barrier_init F
GLIBC_2.38 pthread_barrier_wait F
--
2.39.5
More information about the Libc-alpha
mailing list