All,
An issue has been raised (see below) about whether pthread_t
should be listed as one of the exceptions from the arithmetic types
in <sys/types.h>. Looking back to the IEEE PASC interpretations, we
possibly have overlooked PASC Interpretation 1003.1c #36 (also attached
below), although this may have been the intention of 1003.1n not to make
this change.
If appropriate we will need to consider this for Technical Corrigendum
Number 1. I'd appreciate views.
regards
Andrew
==========================================================
Single UNIX Specification Defect Report:
-----------------------------------------
From: Daniel Villeneuve
Date: 2001 Sep 12
------------------------------------------------------------------------
Defect Report concerning (volume of the Single UNIX Specification):
System Interfaces & Headers Issue 5 (XSH5) [UNIX 98]
------------------------------------------------------------------------
Qualifier (e.g. error, omission, clarification required):
1
Error=1 , Omission=2, Clarification=3
------------------------------------------------------------------------
References in document (e.g. page, clause, figure, and/or table
numbers or URL if applicable):
IEEE P1003.1 Draft 7 June 2001/Open Group Technical Standard, Issue 6
------------------------------------------------------------------------
Nature of defect (complete, concise explanation of the perceived
problem):
The nature of the type pthread_t is ambiguous.
On the one hand, pthread_t is defined in sys/types.h
(page 366, line 12916) as an arithmetic type
(page 367, line 12973-12974).
On the other hand, the existence of the function pthread_equal
(page 1545, line 33300) suggests that using the equality
operator == on two objects of type pthread_t might not work
portably. This is further supported by the explanation
in the Rationale Section, which allows for definitions of
pthread_t as structures.
------------------------------------------------------------------------
Solution proposed by the submitter (optional):
1- Leave pthread_t as an arithmetic type and document
the function pthread_equal as obsolete (also remove
the rationale comment about pthread_t defined as a
structure).
2- Add pthread_t to the list of exceptions in sys/types.h.
------------------------------------------------------------------------
=================================================================
Defect Report concerning: IEEE Std. 1003.1c-1995, ISO/IEC 9945-1:1990
AMD 2 - Threads
Clause: 2.5
PASC Interpretation Ref: pasc-1003.1c-36
Topic: primitive system data types
This is an unapproved interpretation of PASC 1003.1c-1995, ISO/IEC
9945-1:1990 AMD 2 - Threads.
Use of the information contained in this unapproved document is at your
own risk.
Last update: 30 March,1998
1003.1c-95 #36
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: primitive system data types
Relevant Sections: 2.5
Interpretation Request: (Defect Report)
-----------------------
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
-----
Andrew Josey The Open Group
Austin Group Chair Apex Plaza,Forbury Road,
Email: yyyyyyy@xxxxxxxxxxxxx Reading,Berks.RG1 1AX,England
Tel: +44 118 9508311 ext 2250 Fax: +44 118 9500110
|