diff options
author | gfleury <gfleury@disroot.org> | 2024-11-18 13:21:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-11-19 01:37:35 +0100 |
commit | 4a8b7d7e62c6a45cfad01a8d5c8b9bb2e4ca2b30 (patch) | |
tree | 3494719ed7c20ad53c727ba8ae5af48a4d45f00f | |
parent | d69a010e7b12fe4fae749f92983de7e505c247cf (diff) | |
download | glibc-4a8b7d7e62c6a45cfad01a8d5c8b9bb2e4ca2b30.zip glibc-4a8b7d7e62c6a45cfad01a8d5c8b9bb2e4ca2b30.tar.gz glibc-4a8b7d7e62c6a45cfad01a8d5c8b9bb2e4ca2b30.tar.bz2 |
htl: move pthread_attr_setstackaddr into libc.
Signed-off-by: gfleury <gfleury@disroot.org>
-rw-r--r-- | htl/Makefile | 4 | ||||
-rw-r--r-- | htl/Versions | 8 | ||||
-rw-r--r-- | sysdeps/htl/pt-attr-setstack.c | 9 | ||||
-rw-r--r-- | sysdeps/htl/pt-attr-setstackaddr.c | 8 | ||||
-rw-r--r-- | sysdeps/htl/pthreadP.h | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libc.abilist | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libpthread.abilist | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libc.abilist | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 |
9 files changed, 33 insertions, 10 deletions
diff --git a/htl/Makefile b/htl/Makefile index 445c0af..d76cba8 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -29,8 +29,6 @@ libpthread-routines := \ pt-attr-setguardsize \ pt-attr-setschedparam \ pt-attr-setscope \ - pt-attr-setstack \ - pt-attr-setstackaddr \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -205,6 +203,8 @@ routines := \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ + pt-attr-setstack \ + pt-attr-setstackaddr \ pt-attr-setstacksize \ pt-getschedparam \ pt-nthreads \ diff --git a/htl/Versions b/htl/Versions index 096b1c3..db8a2de 100644 --- a/htl/Versions +++ b/htl/Versions @@ -20,6 +20,8 @@ libc { pthread_attr_getstackaddr; pthread_attr_getstack; pthread_attr_setstacksize; + pthread_attr_setstackaddr; + pthread_attr_setstack; } GLIBC_2.21 { @@ -55,6 +57,8 @@ libc { pthread_attr_getstackaddr; pthread_attr_getstack; pthread_attr_setstacksize; + pthread_attr_setstackaddr; + pthread_attr_setstack; } @@ -70,6 +74,8 @@ libc { __pthread_attr_getstackaddr; __pthread_attr_getstack; __pthread_attr_setstacksize; + __pthread_attr_setstackaddr; + __pthread_attr_setstack; } } @@ -101,7 +107,7 @@ libpthread { pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; - pthread_attr_setscope; pthread_attr_setstack; pthread_attr_setstackaddr; + pthread_attr_setscope; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/sysdeps/htl/pt-attr-setstack.c b/sysdeps/htl/pt-attr-setstack.c index 9ac6fe1..c02a13b 100644 --- a/sysdeps/htl/pt-attr-setstack.c +++ b/sysdeps/htl/pt-attr-setstack.c @@ -18,7 +18,7 @@ #include <pthread.h> #include <assert.h> - +#include <shlib-compat.h> #include <pt-internal.h> #include <pthreadP.h> @@ -47,4 +47,9 @@ __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize return 0; } -weak_alias (__pthread_attr_setstack, pthread_attr_setstack) +libc_hidden_def (__pthread_attr_setstack) +versioned_symbol (libc, __pthread_attr_setstack, pthread_attr_setstack, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pt-attr-setstackaddr.c b/sysdeps/htl/pt-attr-setstackaddr.c index c4fda74..6941ef8 100644 --- a/sysdeps/htl/pt-attr-setstackaddr.c +++ b/sysdeps/htl/pt-attr-setstackaddr.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,9 @@ __pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr) attr->__stackaddr = stackaddr; return 0; } -weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +libc_hidden_def (__pthread_attr_setstackaddr) +versioned_symbol (libc, __pthread_attr_setstackaddr, pthread_attr_setstackaddr, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setstackaddr,pthread_attr_setstackaddr, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index f54c949..6f6f6df 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -85,6 +85,7 @@ int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); libc_hidden_proto (__pthread_attr_getstackaddr) int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); +libc_hidden_proto (__pthread_attr_setstackaddr) int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); libc_hidden_proto (__pthread_attr_getstacksize) @@ -92,6 +93,7 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); libc_hidden_proto (__pthread_attr_setstacksize) int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); +libc_hidden_proto (__pthread_attr_setstack) int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); libc_hidden_proto (__pthread_attr_getstack) void __pthread_testcancel (void); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index d7946ed..dabb135 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -42,6 +42,8 @@ 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 +GLIBC_2.12 pthread_attr_setstack F +GLIBC_2.12 pthread_attr_setstackaddr F GLIBC_2.12 pthread_attr_setstacksize F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F @@ -2493,6 +2495,8 @@ 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_setstack F +GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 1c0610c..61c6d86 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -26,8 +26,6 @@ GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_attr_setscope F -GLIBC_2.12 pthread_attr_setstack F -GLIBC_2.12 pthread_attr_setstackaddr 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 46b8694..f4f65ca 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1527,6 +1527,8 @@ GLIBC_2.38 pthread_attr_setinheritsched F GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_attr_setschedpolicy F GLIBC_2.38 pthread_attr_setscope F +GLIBC_2.38 pthread_attr_setstack F +GLIBC_2.38 pthread_attr_setstackaddr F GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_destroy F @@ -2193,6 +2195,8 @@ 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_setstack F +GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 9626176..2f57b85 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -43,8 +43,6 @@ GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_attr_setscope F -GLIBC_2.38 pthread_attr_setstack F -GLIBC_2.38 pthread_attr_setstackaddr F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F |