Interpretations

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

IEEE Standards Interpretation for IEEE Std 1003.1™-1990 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)

Copyright © 2001 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 #91
Topic:
PTHREAD_CANCEL_* symbols required as macros? Relevant Sections: p351, ll 158-159,162-163, 18.2.2.2; plus others PASC

Appendix C describes the following macros for threads support to be present in <pthread.h>: PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_ENABLE PTHREAD_CREATE_DETACHED PTHREAD_CREATE_JOINABLE PTHREAD_SCOPE_PROCESS PTHREAD_EXPLICIT_SCHED PTHREAD_SCOPE_SYSTEM PTHREAD_INHERIT_SCHED however nowhere in the normative text does it appear to require that these be defined as macros. Is it conforming to define these as enumerated values such as follows? enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS };

Interpretation Response
The standard is silent on the issue and either behaviour is conforming. This is being forwarded to the sponsor.

Rationale for Interpretation
Annex C is informative and not part of the standard.

Note to Project Editor (not part of the interpretation)
It is recommended that this issue be clarified in Annex C in a future revision. Forwarded to Interpretations group: 29 June 1998 Proposed Interpretation: 17 Jul 1998 Finalized: February 17 1999