Use of the information contained in this unapproved document is at your own risk
.Last update: 30 March,1998
1003.1c-95 #46
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: pthread.h
Relevant Sections: Many 11.x, 13.x, 16.x, 17.x
Interpretation Request: (Defect Report)
-----------------------
Date: Thu, 9 Oct 1997 09:20:02 -0500
From: ajosey@rdg.opengroup.org
------------------------------------------------------------------------
7 Defect Report concerning (number and title of International Standard
or DIS final text, if applicable):
Threads Extensions: IEEE Std 1003.1c-1995
------------------------------------------------------------------------
8 Qualifier (e.g. error, omission, clarification required):
2
Error=1 , Omission=2, Clarification=3
------------------------------------------------------------------------
9 References in document (e.g. page, clause, figure, and/or table
numbers):
13.5.1.2 , 11.x, 16.x, 17.x
------------------------------------------------------------------------
10 Nature of defect (complete, concise explanation of the perceived
problem):
The lack of an explicit description of <pthread.h> in
POSIX.1-1996 (except the informative Annex C, P593-594, L181-223,
which is not normative) appears to be an omission in the specification.
Many functions include <pthread.h> in their synopses, however
it is clear that there are other headers required for a program
to compile as per the synopses given.
The Open Group's Base working group suggest that this is
an omission in the specification which can lead to applications
portability problems and put forward
the following additions to POSIX.1-1996 for consideration
in a future revision.
------------------------------------------------------------------------
11 Solution proposed by the submitter (optional):
1. Change every synopsis in POSIX.1-1996 that includes <pthread.h>
to add:
#include <sys/types.h>
before the #include <pthread.h>. This is needed in POSIX.1
to define pthread_attr_t, pthread_cond_t, pthread_condattr_t,
pthread_key_t, pthread_mutex_t, pthread_mutexattr_t,
pthread_once_t, pthread_rwlock_t, pthread_rwlockattr_t, and
pthread_t. This ties in with section 2.5.
2. Add new sentence to the paragraph ending on POSIX.1-1996, P301, L536:
The symbols defined in <sched.h> shall be defined by the
header <pthread.h>.
(This is at the end of the paragraph talking about
pthread_attr_[gs]etschedpolicy() in the description of Thread
Creation Scheduling Attributes.)
3. Add a new paragraph after POSIX.1-1996, P594, L223:
and the symbols defined by <sched.h>.
An alternate to 1 and 2 above is to:
add the following as a new paragraph after POSIX.1-1996, P252,
L407 (end of introduction to Mutexes):
Inclusion of the <pthread.h> header may make visible
the symbols allowed by this part of ISO/IEC 9945 to be
in the headers <sys/types.h> and <sched.h>.
------------------------------------------------------------------------
Interpretation response
-----------------------
The standard does not speak to this issue, and as such no conformance
distinction can be made between alternative implementations based on this.
This is being referred to the sponsor.
Also see Interpretation reference P1003.1 #86
Rationale
-------------
This appears to be an ommision in the specification.
The suggested changes should be considered for a future revision.
Forwarded to Interpretations group: Oct 10 1997
Proposed resolution: Feb 26 1998
Finalised: Mar 30 1998