Multithreaded Programming Guide


pthread_attr_getstackaddr(3T) returns the thread stack address set by pthread_attr_setstackaddr().


int	pthread_attr_getstackaddr(pthread_attr_t *tattr,void * *stackaddr);
#include <pthread.h>

pthread_attr_t tattr;
void *base;
int ret;

/* getting a new address */
ret = pthread_attr_getstackaddr (&tattr, *base); 

Return Values

Returns zero after completing successfully. Any other returned value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.


The value or base or tattr is incorrect.