Use of the information contained in this unapproved document is at your own risk
.Last update: 10 April,2001
1003.1-96 #91
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: PTHREAD_CANCEL_* symbols required as macros?
Relevant Sections: p351, ll 158-159,162-163, 18.2.2.2; plus others
PASC Interpretation Request: (Defect Report)
----------------------------
Date: Mon, 29 Jun 1998 08:56:59 -0500
------------------------------------------------------------------------
7 Defect Report concerning (number and title of International Standard
or DIS final text, if applicable):
IEEE Std 1003.1-1996 (incorporates 1003.1-1990, 1003.1b-1993, 1003.1c-1995, 1003.1i-1995) (ISO 9945-1:1996)
------------------------------------------------------------------------
8 Qualifier (e.g. error, omission, clarification required):
3
Error=1 , Omission=2, Clarification=3
------------------------------------------------------------------------
9 References in document (e.g. page, clause, figure, and/or table
numbers):
p351, ll 158-159,162-163, 18.2.2.2; plus others
------------------------------------------------------------------------
10 Nature of defect (complete, concise explanation of the perceived
problem):
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 };
------------------------------------------------------------------------
11 Solution proposed by the submitter (optional):
------------------------------------------------------------------------
Proposed interpretation:
-------------------------
The standard is silent on the issue and either behaviour is conforming.
This is being forwarded to the sponsor.
Rationale
-------------
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
Finalised: February 17 1999