Sets the value of the stackaddr attribute of a thread attributes object.
Threads Library (libpthreads.a)
#include <pthread.h>
int pthread_attr_setstackaddr (attr, stackaddr)
pthread_attr_t *attr;
void *stackaddr;
The pthread_attr_setstackaddr subroutine sets the value of the stackaddr attribute of the thread attributes object attr. This attribute specifies the stack address of a thread created with this attributes object.
AIXTHREAD_GUARDPAGES_FOR_USER_STACK=n (Where n is the decimal number of guard pages.)
Item | Description |
---|---|
attr | Specifies the thread attributes object. |
stackaddr | Specifies the stack address to set. It is a void pointer. The
address that needs to be passed is not the beginning of the malloc
generated address but the beginning of the stack. For example:
|
Upon successful completion, 0 is returned. Otherwise, an error code is returned.
The pthread_attr_setstackaddr subroutine is unsuccessful if the following is true:
Item | Description |
---|---|
EINVAL | The attr parameter is not valid. |
ENOSYS | The stack address POSIX option is not implemented. |