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.
A Provision has been made in libpthreadsto create guardpages for the user stack internally. This is used for debugging purposes only. By default, it is turned off and can be invoked by exporting the following environmental variable:
AIXTHREAD_GUARDPAGES_FOR_USER_STACK=n (Where n is the decimal number of guard pages.)
Upon successful completion, 0 is returned. Otherwise, an error code is returned.
The pthread_attr_setstackaddr subroutine is unsuccessful if the following is true:
EINVAL | The attr parameter is not valid. |
ENOSYS | The stack address POSIX option is not implemented. |
The pthread_attr_getstackaddr (pthread_attr_getstackaddr Subroutine) subroutine, pthread_attr_init (pthread_attr_init Subroutine) subroutine, the pthread.h file.
Advanced Attributes in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
Threads Library Options and Threads Library Quick Reference in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.