4d1 Subj : Re: pthread_attr_setstackaddr() on Linux To : comp.programming.threads From : Haro Panosyan Date : Wed Jun 08 2005 06:01 pm Thanks David, With my first compilation I got WARNING message for pthread_attr_setstackaddr() function being depreciated, so I am using pthread_attr_setstack() on "ENTERPRIZE" machines only, i.e if "uname -a" will return GNU/Linux at the end. For SunOS still I am using "pthread_attr_setstackaddr()". And for "None ENTERPRIZE" machine I am not using either. If someone could help me to really understand what is "ENTERPRIZE" and what is not, then that should be very helpfull. Thanks, -haro David Butenhof wrote: > Haro Panosyan wrote: > >> These two POSIX standard functions >> >> pthread_attr_setstacksize(); >> pthread_attr_setstackaddr(); > > > Don't use pthread_attr_setstackaddr(). Although Linux inferred a > relationship between stacksize and stackaddr, this was never intended or > specified by the standard, and is not portable. > > You should use pthread_attr_setstack() instead, which specifies the BASE > ADDRESS and SIZE of a region of memory to be used as the created > thread's stack. This is portable and standard. > . 0