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 #128
Topic: 1003.1q
Relevant Sections: Annex B line 678, 683
PASC
The example is a little bit misleading, because posix_trace_emptyset() is called before posix_trace_event_set_fill(). According to the specification (Section 21 line 1160,1161) it is not necessary to call posix_trace_emptyset() before posix_trace_event_set_fill().
Interpretation Response
There is no defect in the standard, as the code shown will work properly
in spite of the fact that the line cited is a NO-OP. Forward to sponsor with
a recommendation that an additional comment be added before line 678:
/*(not strictly required because posix_trace_event_set_fill()
/*will ignore the prior contents of the event set.)*/
Rationale
for Interpretation
Francois Riche's response follows:
This is perfectly right, there is no need to call posix_trace_emptyset()
before the call of posix_trace_event_set_fill() as referenced in
section 21 line 1160-1.
This is a little bit confusing, but this generates no mistake,
this is cautious programming style to avoid surprise with future
modification of the code.
I would agree to add a comment like this one:
It is not required here before a call to posix_trace_event_set_fill()
but it is a programming precaution.
Notes to the Project Editor (not part of this interpretation)
AGR D5
@ page 3483 line 7732 section B.2.11.3 objection
Problem:
The example is misleading because it implies that this
posix_trace_eventset_emptyset() is required before the
posix_trace_eventset_fill() that follows. It is not.
Action:
Add before this line the following comment lines
/*(not strictly required because posix_trace_event_set_fill()
/*will ignore the prior contents of the event set.)*/
Forwarded to Interpretations Group: 27 Feb 2001
Proposed resolution: 21 March 2001
Finalized: April 5 2001