Interpretations

Answering questions that may arise related to the meaning of portions of an IEEE standard concerning specific applications.

IEEE Standards Interpretations for IEEE Std 1003.1c™-1995 IEEE Standard for Information Technology--Portable Operating System Interface (POSIX(R)) - System Application Program Interface (API) Amendment 2: Threads Extension (C Language)

Copyright © 1996 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.

Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.

IEEE Standards Department, Copyrights and Permissions, 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA

Interpretation Request #36
Topic: primitive system data types Relevant Clauses: 2.5

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 for Interpretation
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.

Proposed changes to 1003.1 (not part of this interpretation)
The interpretations committee recommends to the sponsor that the following changes be made: 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;"