On Sun, Oct 07, 2007 at 10:46:46AM +0200, Nadav Har'El wrote:
> On Sun, Oct 07, 2007, Muli Ben-Yehuda wrote about "Re: getting the current 
> stack size of a given thread on linux":
> > pthread_attr_getstacksize(). See also pthread.h for various other
> > thread stack manipulation routines.
> 
> Muli, how do you get the pthread_attr_t object for the currect
> thread?

If you don't mind only being portable to GNU systems:

pthread.h:

#ifdef __USE_GNU
/* Initialize thread attribute *ATTR with attributes corresponding to the
   already running thread TH.  It shall be called on unitialized ATTR
   and destroyed with pthread_attr_destroy when no longer needed.  */
extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
#endif

Not sure what's the non-portable way of doing it.

Cheers,
Muli
-- 
SYSTOR 2007 --- 1st Annual Haifa Systems and Storage Conference 2007
http://www.haifa.il.ibm.com/Workshops/systor2007/

Virtualization workshop: Oct 29th, 2007 | Storage workshop: Oct 30th, 2007

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to