Defect report from : Andrew Josey , The Open Group
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 367 line 12988 section sys/types.h objection {pthread_t.}
Problem:
Defect code : 1. Error
Note: This was discussed in mail seq 3520-3524 but missed
for TC1 (so better late than never...).
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.
Commentary:
The original POSIX threads working group intended that pthread_t be
opaque. The specification was deliberately designed to allow
pthread_t to be a structure for better validation checking support.
(Except, of course, that we missed that
annoying blanket statement that all the types were arithmetic... and
apparently also failed to notice that the edit to add the exclusions
wasn't complete.)
Action:
Propose an interpretation that this is an error in the
specification to be forwarded to the sponsor.
A future revision is recommended to add pthread_t to the
list of exceptions on lines 12975 in <sys/types.h>
|