mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user