Posix threads

Joel Sherrill joel at rtems.org
Fri Jan 15 20:08:09 UTC 2016

On Fri, Jan 15, 2016 at 3:50 AM, Hal Murray <hmurray at megapathdsl.net> wrote:

> I'm looking for cruft to clean up.
> If we have pthreads, will we also have pthread_attr_getstacksize and
> pthread_attr_setstacksize?
> devel/hacking.txt says
> > You can view POSIX-1.2001, with 2004 Corrigendum, online for free here:
> >    http://pubs.opengroup.org/onlinepubs/009695399/toc.htm
> http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_setstack
> size.html says:
> The pthread_attr_getstacksize() and pthread_attr_setstacksize() functions
> are
> marked as part of the Threads and Thread Stack Size Attribute options.
> The restrict keyword is added to the pthread_attr_getstacksize() prototype
> for alignment with the ISO/IEC 9899:1999 standard.
> I can't figure out if that means somebody could implement Threads without
> implementing Thread Stack Size.  Or even if they can, would anybody
> actually
> do it?
The bottom of the Open Group web pages have revision history and note which
issue version things appeared or changed. This is the 2013 version:


It has the history at the bottom and says it has been in since Issue 5 and
was updated to add restrict keyword in 2001 for Issue 6.

I think this means it is always in the NTPsec assumed base OS profile of
POSIX 2001 and C99. My RTEMS memory says we have had this since our first
pthreads support which would have been 1994. That may be what is called
Issue 5.

I have a paper copy of that POSIX version but forgot to check it at the

Bottom line, assume it is safe to use in the NTPsec assumed POSIX 2001

> --
> These are my opinions.  I hate spam.
> _______________________________________________
> devel mailing list
> devel at ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160115/5afeacbc/attachment.html>

More information about the devel mailing list