Operating System - HP-UX
1832308 Members
2341 Online
110041 Solutions
New Discussion

Get thread stack size + base

 

Get thread stack size + base

I want to get a pthread's stack size + base addr without knowing or modifying where the thread was created.

The pthread.h seems to contain exactly what I need, unfortunately no doc.

Tried :
{ struct _pthread_stack_info info;
pthread_t self = pthread_self();
int result = _pthread_stack_info_np(self, &info);
printf ("Result %d, Stacksize %d\n", result, info.stk_stacksize);
}

Unfortunately I get result 3 and stacksize zero...

Any ideas ?