mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
(__pthread_attr_setstack): Fix setting of __stackaddr element. Add warnings for using pthread_attr_getstackaddr and pthread_attr_setstackaddr.
This commit is contained in:
parent
03bac9acad
commit
e8a5cd43ab
@ -169,6 +169,9 @@ int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
|
||||
}
|
||||
weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr)
|
||||
|
||||
link_warning (pthread_attr_setstackaddr,
|
||||
"the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'")
|
||||
|
||||
int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
|
||||
{
|
||||
/* XXX This function has a stupid definition. The standard specifies
|
||||
@ -179,6 +182,10 @@ int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
|
||||
}
|
||||
weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr)
|
||||
|
||||
link_warning (pthread_attr_getstackaddr,
|
||||
"the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'")
|
||||
|
||||
|
||||
int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
|
||||
{
|
||||
#ifdef FLOATING_STACKS
|
||||
@ -233,7 +240,7 @@ int __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
|
||||
err = __pthread_attr_setstacksize (attr, stacksize);
|
||||
if (err == 0)
|
||||
{
|
||||
#ifdef _STACK_GROWS_UP
|
||||
#ifndef _STACK_GROWS_UP
|
||||
attr->__stackaddr = (char *) stackaddr + stacksize;
|
||||
#else
|
||||
attr->__stackaddr = stackaddr;
|
||||
|
Loading…
Reference in New Issue
Block a user