Obtains the stack address attribute of the specified thread attributes object.
1 – C Binding
#include <pthread.h> int pthread_attr_getstackaddr ( const pthread_attr_t *attr, void **stackaddr);
2 – Arguments
attr Address of the thread attributes object whose stack address attribute is obtained. stackaddr Receives the value of the stack address attribute of the thread attributes object specified by attr.
3 – Description
This routine obtains the value of the stack address attribute of the thread attributes object specified in the attr argument and stores it in the location specified by the stackaddr argument. The specified attributes object must already be initialized when this routine is called. The stack address attribute of a thread attributes object points to the origin of the stack for a new thread. Note that the value of the stack address attribute of a particular thread attributes object does not necessarily correspond to the actual stack origin of any existing thread in your multithreaded program.
4 – Return Values
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Return Description 0 Successful completion. [EINVAL] The value specified by attr is not a valid thread attributes object.
5 – Associated Routines
pthread_attr_getguardsize() pthread_attr_getstacksize() pthread_attr_init() pthread_attr_setguardsize() pthread_attr_setstackaddr() pthread_attr_setstacksize() pthread_create()