Defect report from : Andrew Josey , The Open Group
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 369 line 13053 section sys/types.h editorial {ag.3520-24}
Problem:
Edition of Specification (Year): 2003
Defect code : 1. Error
The type pthread_t is missing from the list of exceptions from being
an arithmetic type. See PASC Interp 1003.1c-1995 #36.
The original POSIX working group absolutely intended that pthread_t be opaque.
The specification was deliberately designed to allow pthread_t to be a
structure for better validation checking support.
_____________________________________________________________________________
PASC Interpretation reference
1003.1c-95 #36
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: primitive system data types
Relevant Sections: 2.5
Interpretation Request:
-----------------------
Date: Mon, 07 Oct 1996 14:41:09 -0400
From: Dave Butenhof (yyyyyyyy@xxxxxxxxxxx)
1. Section 2.5, Primitive System Data Types
The pthread data types (pthread_t, pthread_attr_t, pthread_cond_t,
pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t,
pthread_key_t, pthread_once_t) are listed in this section, and in
Table 2-1. Unfortunately, while all of these types have been
specifically described as "opaque" types (and 2.5 even reminds
readers that there are "no defined comparison or assignment
operators" for most of the types, oddly omitting some), The second
paragraph of this section says clearly "All of the types listed in
Table 2-1 shall be arithmetic types".
1a) This is not true, and the working group did not intend to make this
a requirement. Either the statement should be changed, for example,
to list the specific types that must be arithmetic, or to exclude
all of those that needn't be -- or else the non arithmetic types
(all the pthread types) should be moved to a separate table.
1b) In addition, the list of types for which there are no defined
comparison or assignment operators omits pthread_key_t and
pthread_once_t, both of which are also "opaque types", and have no
comparison or assignment operators.
Interpretation response
-----------------------
The standard is unclear on this issue, and no conformance distinction
can be made between alternative implementations based on this.
This is being referred to the sponsor.
Rationale
-------------
As noted in the request these types are described elsewhere in the
standard as opaque types as an aid to extensibility. Although not
part of the normative text, the rationale for POSIX 1003.1c/D10
makes it very clear that these are opaque data types.
Furthermore, the text in lines 970-972 that "There are no defined
comparison or assignment operators for the types pthread_attr_t,
pthread_cond_t, pthread_condattr_t, pthread_mutex_t, and
pthread_mutex_attr_t." contradicts the claim on line 963 that these
types shall be arithmetic, since all arithmetic types have defined
comparison and assignment operators.
The interpretations committee recommends to the sponsor that the
following changes be made:
Proposed changes to 1003.1 (not part of this interpretation).
--------------------------
Change 1003.1-1996 ll 963 first sentence from
"All of the types listed in Table 2-1 shall be arithmetic types;"
To:
"All of the types listed in Table 2-1 shall be arithmetic types,
except the types pthread_t, pthread_attr_t, pthread_mutex_t,
pthread_mutexattr_t, pthread_cond_t, pthread_condattr_t, pthread_key_t,
pthread_once_t;"
Forwarded to Interpretations group: Oct 20 1996
Proposed interpretation:29 Jan 97
Finalised: Feb 18 1997
Action:
Add pthread_t to the list before pthread_attr_t
|