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:20 +0200 |
commit | 870218fb30a83c071b53b036d1eb33df7e30397e (patch) | |
tree | 41fd5c55d08374dd044b248a8b394fb7a5d97369 /nptl | |
parent | 736c57c96cd1fd79905cf0f224ca6e3864eb71b4 (diff) | |
download | glibc-870218fb30a83c071b53b036d1eb33df7e30397e.zip glibc-870218fb30a83c071b53b036d1eb33df7e30397e.tar.gz glibc-870218fb30a83c071b53b036d1eb33df7e30397e.tar.bz2 |
nptl: Move pthread_attr_setstacksize into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
It is necessary to arrange for a
__libpthread_version_placeholder@GLIBC_2.6 on some of the powerpc
targets.
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_setstacksize.c | 25 |
3 files changed, 19 insertions, 11 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 39feea5..bbd5997 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -84,6 +84,7 @@ routines = \ pthread_attr_setsigmask_internal \ pthread_attr_setstack \ pthread_attr_setstackaddr \ + pthread_attr_setstacksize \ pthread_barrier_destroy \ pthread_barrier_init \ pthread_barrier_wait \ @@ -200,7 +201,6 @@ libpthread-routines = \ libpthread-compat \ nptl-init \ pt-interp \ - pthread_attr_setstacksize \ pthread_cancel \ pthread_create \ pthread_getattr_default_np \ diff --git a/nptl/Versions b/nptl/Versions index edf4da4..0045780 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -78,6 +78,7 @@ libc { pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setstackaddr; + pthread_attr_setstacksize; pthread_mutexattr_gettype; pthread_mutexattr_settype; pthread_rwlock_destroy; @@ -254,6 +255,7 @@ libc { pthread_attr_setguardsize; pthread_attr_setstack; pthread_attr_setstackaddr; + pthread_attr_setstacksize; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; @@ -402,7 +404,6 @@ libpthread { } GLIBC_2.1 { - pthread_attr_setstacksize; pthread_create; pthread_getconcurrency; pthread_setconcurrency; diff --git a/nptl/pthread_attr_setstacksize.c b/nptl/pthread_attr_setstacksize.c index 1433cec..2dbd981 100644 --- a/nptl/pthread_attr_setstacksize.c +++ b/nptl/pthread_attr_setstacksize.c @@ -19,6 +19,7 @@ #include <errno.h> #include <limits.h> #include "pthreadP.h" +#include <shlib-compat.h> #ifndef NEW_VERNUM # define NEW_VERNUM GLIBC_2_3_3 @@ -41,15 +42,22 @@ __pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) return 0; } +versioned_symbol (libc, __pthread_attr_setstacksize, + pthread_attr_setstacksize, GLIBC_2_34); + #if PTHREAD_STACK_MIN == 16384 -strong_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) -#else -# include <shlib-compat.h> -versioned_symbol (libpthread, __pthread_attr_setstacksize, - pthread_attr_setstacksize, NEW_VERNUM); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstacksize, + pthread_attr_setstacksize, GLIBC_2_1); +# endif +#else /* PTHREAD_STACK_MIN != 16384 */ +# if OTHER_SHLIB_COMPAT (libpthread, NEW_VERNUM, GLIBC_2_34) +compat_symbol (libpthread, __pthread_attr_setstacksize, + pthread_attr_setstacksize, NEW_VERNUM); +# endif -# if SHLIB_COMPAT(libpthread, GLIBC_2_1, NEW_VERNUM) +# if OTHER_SHLIB_COMPAT(libpthread, GLIBC_2_1, NEW_VERNUM) int __old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) @@ -73,6 +81,5 @@ __old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) compat_symbol (libpthread, __old_pthread_attr_setstacksize, pthread_attr_setstacksize, GLIBC_2_1); -# endif - -#endif +# endif /* OTHER_SHLIB_COMPAT */ +#endif /* PTHREAD_STACK_MIN != 16384 */ |