Defect Report concerning: IEEE Std. 1003.1-1996, ISO/IEC 9945-1:1996 - C API
Clause: Page 315, clause 14.2.4
PASC Interpretation Ref: pasc-1003.1-89
Topic: timer_settime


This is an unapproved interpretation of PASC 1003.1-1996, ISO/IEC 9945-1:1996 - C API.

Use of the information contained in this unapproved document is at your own risk.

Last update: 10 April,2001


								1003.1-96  #89

 _____________________________________________________________________________

	Interpretation Number:	XXXX
	Topic:			timer_settime
	Relevant Sections:	Page 315, clause 14.2.4


PASC Interpretation Request: (Defect Report)
----------------------------  

	Date: Sun, 3 May 1998 02:43:27 -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):

Page 315, clause 14.2.4

------------------------------------------------------------------------ 

10  Nature of defect (complete, concise explanation of the perceived
    problem):


The timer_settime() specificiation states:

"If any of the following errors occur...."

[EINVAL]A value structure specified a nanosecond value less than zero or 
greater than or equal to 1000 million."

The spec also states:

"If the it_value member of value is zero, the timer is disarmed. 
The effect of disarming or resetting a timer on pending expiration
notifications is unspecified. "

If I call timer_settime() with  value->it_interval 
less than zero and greater than or equal to 100 million, and the 
it_value set to zero - is it conforming for an implementation
of timer_settime() to succeed without an EINVAL error?


------------------------------------------------------------------------ 

11  Solution proposed by the submitter (optional):

The intent should be:  disarm the timer and ignore the
bogus interval value.

However, the standard is clear in this respect.  Section 2.4,
only allows errors to be omitted if they are of the "if
detected" variety.  The EINVAL return in 14.2.4.4, line 297 SHALL be
returned.

The description in 14.2.4.2, lines 225-226, states "If the
it_value member of value is zero, the timer SHALL be disarmed".

A proposed disposition is as follows:

The standard states that  the function needs to disarm the timer, 
AND return -1 and set errno to EINVAL,  however concerns are being
forwarded to the sponsor.

Proposed note to project editor (not part of the interpretation):

It is recommended that a future revision consider making the 
the EINVAL return an "if detected" or otherwise reword it so that the
function can succeed even with a garbage value of it_interval, 
so long as it_value is zero.


------------------------------------------------------------------------ 


Interpretation:
---------------
The standard states that  the function needs to disarm the timer, 
AND return -1 and set errno to EINVAL,  however concerns are being
forwarded to the sponsor.



Rationale
-------------
None.

Note to project editor (not part of the interpretation):
--------------------------------------------------------

It is recommended that a future revision consider making the 
the EINVAL return an "if detected" or otherwise reword it so that the
function can succeed even with a garbage value of it_interval, 
so long as it_value is zero.

Forwarded to Interpretations group: 3 May 1998
Proposed interpretation: 17 Jul 1998
Finalised: February 17 1999