diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-11 19:32:43 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-11 19:33:17 +0200 |
commit | b855e52bae0f754150fbad78c76d363b6eb2e53c (patch) | |
tree | 7d4997134e6c2ffbdecae8a6bf1bd19ff5f58a25 /nptl | |
parent | da069d171482032231e1472f8b256f3c043e585f (diff) | |
download | glibc-b855e52bae0f754150fbad78c76d363b6eb2e53c.tar.gz glibc-b855e52bae0f754150fbad78c76d363b6eb2e53c.tar.xz glibc-b855e52bae0f754150fbad78c76d363b6eb2e53c.zip |
nptl: Move pthread_attr_setstack into libc
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 3 | ||||
-rw-r--r-- | nptl/pthread_attr_setstack.c | 31 |
3 files changed, 21 insertions, 15 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 9bd601ae57..a4f1e91649 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -82,6 +82,7 @@ routines = \ pthread_attr_setscope \ pthread_attr_setsigmask \ pthread_attr_setsigmask_internal \ + pthread_attr_setstack \ pthread_barrier_destroy \ pthread_barrier_init \ pthread_barrier_wait \ @@ -198,7 +199,6 @@ libpthread-routines = \ libpthread-compat \ nptl-init \ pt-interp \ - pthread_attr_setstack \ pthread_attr_setstackaddr \ pthread_attr_setstacksize \ pthread_cancel \ diff --git a/nptl/Versions b/nptl/Versions index c7e8cb579e..b96fadf49f 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -113,6 +113,7 @@ libc { __pthread_rwlock_unlock; __pthread_rwlock_wrlock; pthread_attr_getstack; + pthread_attr_setstack; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; @@ -250,6 +251,7 @@ libc { pthread_attr_getstackaddr; pthread_attr_getstacksize; pthread_attr_setguardsize; + pthread_attr_setstack; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; @@ -414,7 +416,6 @@ libpthread { } GLIBC_2.2 { - pthread_attr_setstack; pthread_getcpuclockid; pthread_yield; pthread_rwlock_timedrdlock; diff --git a/nptl/pthread_attr_setstack.c b/nptl/pthread_attr_setstack.c index 357f633f0e..41d6b4d789 100644 --- a/nptl/pthread_attr_setstack.c +++ b/nptl/pthread_attr_setstack.c @@ -19,6 +19,7 @@ #include <errno.h> #include <limits.h> #include "pthreadP.h" +#include <shlib-compat.h> #ifndef NEW_VERNUM @@ -53,16 +54,21 @@ __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, return 0; } +versioned_symbol (libc, __pthread_attr_setstack, pthread_attr_setstack, + GLIBC_2_34); #if PTHREAD_STACK_MIN == 16384 -strong_alias (__pthread_attr_setstack, pthread_attr_setstack) -#else -# include <shlib-compat.h> -versioned_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, - NEW_VERNUM); - -# if SHLIB_COMPAT(libpthread, GLIBC_2_2, NEW_VERNUM) +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, + GLIBC_2_2); +# endif +#else /* PTHREAD_STACK_MIN != 16384 */ +# if OTHER_SHLIB_COMPAT (libpthread, NEW_VERNUM, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, + NEW_VERNUM); +# endif +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, NEW_VERNUM) int __old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize) @@ -80,11 +86,11 @@ __old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, # endif iattr->stacksize = stacksize; -#if _STACK_GROWS_DOWN +# if _STACK_GROWS_DOWN iattr->stackaddr = (char *) stackaddr + stacksize; -#else +# else iattr->stackaddr = (char *) stackaddr; -#endif +# endif iattr->flags |= ATTR_FLAG_STACKADDR; return 0; @@ -92,6 +98,5 @@ __old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, compat_symbol (libpthread, __old_pthread_attr_setstack, pthread_attr_setstack, GLIBC_2_2); -# endif - -#endif +# endif /* OTHER_SHLIB_COMPAT */ +#endif /* PTHREAD_STACK_MIN != 16384 */ |