Hi,

Scott Cheloha wrote on Fri, Jul 06, 2018 at 07:31:36PM -0500:
> On Fri, Jul 06, 2018 at 03:07:12PM +0200, Mark Kettenis wrote:
>> Paul Irofti wrote on Fri, 6 Jul 2018 15:36:07 +0300:
>>> somebody wrote:

>>>> POSIX currently says:
>>>> 
>>>>   The behavior is undefined if the value specified by the attr
>>>>   argument to pthread_create() does not refer to an initialized thread
>>>>   attributes object.

>>> I don't see that bit:
>>> 
>>> http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_create.html

That is -p1003.1-2004, an old version of the standard.

>>> On the contrary, I see what our manual states:
>>> 
>>>   [EINVAL]
>>>       The attributes specified by attr are invalid.

>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_create.html

That is -p1003.1-2008, the current version of the standard.

> If we're gonna adhere to the latest behavior we ought to update the cited
> standard from ISO/IEC 9945-1:1996 ("POSIX.1") to... something more recent.
> 
> ISO/IEC 9945-1:2009 contains the behavior you're describing, but most
> of our manpages cite revisions of IEEE 1003.1.  Most of *those* cite
> 2008, but judging from your link the 2017 revision is the new hotness.
> 
> The distinction between ISO/IEC 9945-1 and IEEE 1003.1 is pretty
> fuzzy to me.
> 
> So, which standard/revision is the preferred citation target, if any?

For library functions, we tend to cite the oldest revision of POSIX
that our implementation conforms to, that is, the first that matches
from the following list:

  -ansiC         \" 1989
  -isoC-99       \" 1990
  -isoC-2011     \" 2011

  -p1003.1       \" 1988
  -p1003.1-90    \" 1990
  -p1003.1-96    \" 1996

  -xpg3          \" 1989
  -xpg4          \" 1992
  -xpg4.2        \" 1994
  -susv2         \" 1997

  -p1003.1-2001  \" 2001
  -p1003.1-2004  \" 2004
  -p1003.1-2008  \" 2008

This approximate rule probably isn't followed completely consistently;
for example, instead of -xpg* and -susv2, some pages might directly
reference the later -p1003.1-2001 or -p1003.1-2004 that incorporated
them.  Some pages might also be more specific and reference e.g.
-p1003.1c-95 instead of -p1003.1-96.  Neither of that would seem
wrong to me.

Note that we will not introduce a new -p1003.1-20xx for the 2016
edition, which is merely incorporated technical corrigenda, not a
new revision of the standard.  It has proven very rare in practice
that the behaviour required by the 2016 edition differs from the
behaviour required by the 2008 edition.  In the odd case where it
does, that is such a bad trap that it ought to be decribed explictly
rather than merely with an .St argument that is easy to overlook.

> And should we update all of the pthread manpages in one sweep?

Any required corrections are welcome.

> cc jmc
> PS and by "we" I totally mean "I".  How hard could it be? :)

The reason such sweeps are rarely done for sections 2/3 is that jmc@
isn't comfortable doing them on his own in those sections.  Where
needed, such sweeps are certainly welcome.

He did the sweep in sections 1/8.  There, the policy is somewhat
different: There, we tend to reference the *newest* standard we
conform to from the above list.

Yours,
  Ingo

Reply via email to