[PATCH 05/13] htl move pthread_attr_getstacksize into libc.

gfleury gfleury@disroot.org
Mon Nov 18 11:21:37 GMT 2024


Signed-off-by: gfleury <gfleury@disroot.org>
---
 htl/Makefile                                | 2 +-
 htl/Versions                                | 5 ++++-
 sysdeps/htl/pt-attr-getstacksize.c          | 7 ++++++-
 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, 15 insertions(+), 5 deletions(-)

diff --git a/htl/Makefile b/htl/Makefile
index 8e5eeb50..ebca4325 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -27,7 +27,6 @@ LCLHDRS :=
 libpthread-routines := \
   pt-attr-getstack \
   pt-attr-getstackaddr \
-  pt-attr-getstacksize \
   pt-attr-init \
   pt-attr-setguardsize \
   pt-attr-setschedparam \
@@ -211,6 +210,7 @@ routines := \
   pt-attr \
   pt-attr-getguardsize \
   pt-attr-getscope \
+  pt-attr-getstacksize \
   # routines
 shared-only-routines = forward
 
diff --git a/htl/Versions b/htl/Versions
index 4372c2de..deca0d41 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -16,6 +16,7 @@ libc {
     pthread_attr_destroy;
     pthread_attr_getguardsize;
     pthread_attr_getscope;
+    pthread_attr_getstacksize;
   }
 
   GLIBC_2.21 {
@@ -47,6 +48,7 @@ libc {
 
   GLIBC_2.41 {
     pthread_attr_getguardsize;
+    pthread_attr_getstacksize;
   }
 
 
@@ -58,6 +60,7 @@ libc {
     ___pthread_self;
     __pthread_init_thread;
     __pthread_default_attr;
+    __pthread_attr_getstacksize;
   }
 }
 
@@ -87,7 +90,7 @@ libpthread {
     pthread_atfork;
 
     pthread_attr_getstack; pthread_attr_getstackaddr;
-    pthread_attr_getstacksize; pthread_attr_init;
+    pthread_attr_init;
     pthread_attr_setguardsize;
     pthread_attr_setschedparam;
     pthread_attr_setscope; pthread_attr_setstack; pthread_attr_setstackaddr;
diff --git a/sysdeps/htl/pt-attr-getstacksize.c b/sysdeps/htl/pt-attr-getstacksize.c
index 1f05fe0d..cac0600b 100644
--- a/sysdeps/htl/pt-attr-getstacksize.c
+++ b/sysdeps/htl/pt-attr-getstacksize.c
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
+#include <shlib-compat.h>
 #include <pt-internal.h>
 
 int
@@ -25,4 +26,8 @@ __pthread_attr_getstacksize (const pthread_attr_t *attr, size_t * stacksize)
   *stacksize = attr->__stacksize;
   return 0;
 }
-weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize)
+versioned_symbol (libc, __pthread_attr_getstacksize, pthread_attr_getstacksize, GLIBC_2_41);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41)
+compat_symbol (libpthread, __pthread_attr_getstacksize,pthread_attr_getstacksize, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 47a4b3d9..34fa8dce 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -36,6 +36,7 @@ GLIBC_2.12 pthread_attr_getinheritsched F
 GLIBC_2.12 pthread_attr_getschedparam F
 GLIBC_2.12 pthread_attr_getschedpolicy F
 GLIBC_2.12 pthread_attr_getscope F
+GLIBC_2.12 pthread_attr_getstacksize F
 GLIBC_2.12 pthread_attr_setdetachstate F
 GLIBC_2.12 pthread_attr_setinheritsched F
 GLIBC_2.12 pthread_attr_setschedpolicy F
@@ -2089,6 +2090,7 @@ GLIBC_2.29 _hurd_port_move F
 GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
 GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
 GLIBC_2.41 pthread_attr_getguardsize F
+GLIBC_2.41 pthread_attr_getstacksize F
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
 GLIBC_2.3 __ctype_toupper_loc F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
index 03fcee4c..8d700ff4 100644
--- a/sysdeps/mach/hurd/i386/libpthread.abilist
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -24,7 +24,6 @@ GLIBC_2.12 funlockfile F
 GLIBC_2.12 pthread_atfork F
 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_init F
 GLIBC_2.12 pthread_attr_setguardsize F
 GLIBC_2.12 pthread_attr_setschedparam F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index ca72304d..c0bf7367 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -1518,6 +1518,7 @@ GLIBC_2.38 pthread_attr_getinheritsched F
 GLIBC_2.38 pthread_attr_getschedparam F
 GLIBC_2.38 pthread_attr_getschedpolicy F
 GLIBC_2.38 pthread_attr_getscope F
+GLIBC_2.38 pthread_attr_getstacksize F
 GLIBC_2.38 pthread_attr_init F
 GLIBC_2.38 pthread_attr_setdetachstate F
 GLIBC_2.38 pthread_attr_setinheritsched F
@@ -2186,6 +2187,7 @@ GLIBC_2.39 stdc_trailing_zeros_ul F
 GLIBC_2.39 stdc_trailing_zeros_ull F
 GLIBC_2.39 stdc_trailing_zeros_us F
 GLIBC_2.41 pthread_attr_getguardsize F
+GLIBC_2.41 pthread_attr_getstacksize F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
 HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist
index 1d189726..c0bfe11d 100644
--- a/sysdeps/mach/hurd/x86_64/libpthread.abilist
+++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist
@@ -41,7 +41,6 @@ GLIBC_2.38 mtx_trylock F
 GLIBC_2.38 mtx_unlock F
 GLIBC_2.38 pthread_attr_getstack F
 GLIBC_2.38 pthread_attr_getstackaddr F
-GLIBC_2.38 pthread_attr_getstacksize F
 GLIBC_2.38 pthread_attr_init F
 GLIBC_2.38 pthread_attr_setguardsize F
 GLIBC_2.38 pthread_attr_setschedparam F
-- 
2.39.5



More information about the Libc-alpha mailing list