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.
Note: The pthread.h header file must be the first included file of each source file using the threads library. Otherwise, the -D_THREAD_SAFE compilation flag should be used, or the cc_r compiler used. In this case, the flag is automatically set.
attr | Specifies the thread attributes object. |
stackaddr | Specifies the stack address to set. It is a void pointer. |
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. |
This subroutine is part of the Base Operating System (BOS) Runtime.
The pthread_attr_getstackaddr subroutine, pthread_attr_init subroutine, the pthread.h file.
Advanced Attributes in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Threads Library Options and Threads Library Quick Reference in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.