Email List: Xaustin-review-lX
[All Lists]

Defect in XBD time.h

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XBD time.h
From: yyyyyyyyyy@xxxxxx
Date: Tue, 23 May 2006 06:51:07 +0100 (BST)
        Defect report from : G. K. Rajani , Hewlett Packard

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 393 line 13771,13774 section time.h editorial {HPOSLGKR200602}

Problem:

Edition of Specification (Year): 2004

Defect code :  1. Error


The standard unnecessarily requires a partial implementation of the
_POSIX_CPUTIME option and the  _POSIX_THREAD_CPUTIME option whenever the 
_POSIX_TIMERS option is implemented.  The manifest constants from
_POSIX_CPUTIME and _POSIX_THREAD_CPUTIME are non-functional and are 
not necessary for an application to use the functions defined by
_POSIX_TIMERS.

The _POSIX_TIMERS option is part of the Realtime option group. The 
_POSIX_CPUTIME option is part of the Advanced Realtime option group
and the _POSIX_THREAD_CPUTIME is part of the Advanced Realtime
threads option group.

The conformance section of the standard mandates  the _POSIX_TIMERS 
option as a prerequisite for the _POSIX_CPUTIME and 
_POSIX_THREAD_CPUTIME option groups.  However, the _POSIX_TIMERS
option group does not require the _POSIX_CPUTIME and
_POSIX_THREAD_CPUTIME option groups.

The Clocks and Timers, system interfaces sections of the standard 
define some of the manifest constants from _POSIX_CPUTIME and
_POSIX_THREAD_CPUTIME option groups in time.h.

The time.h section of the standard incorrectly requires a partial
implementation of the *_CPUTIME_ID manifest constants for the
_POSIX_TIMERS options group.

The details of the different sections of the standard with the above
requirements are provided here.

XBD section 2.1.5.2 XSI Option Groups page 26 line 968 states that 
if the symbolic constant _POSIX_CPUTIME is defined,then the symbolic 
constant _POSIX_TIMERS shall also be defined by the implementation 
to have the value 200112L.

XBD section 2.1.5.2 XSI Option Groups page 27 line 1007 states that 
If the symbolic constant _POSIX_THREAD_CPUTIME is defined to have 
the value 200112L, then the symbolic constant _POSIX_TIMERS shall 
also be defined by the implementation to have the value 200112L.

XSH section 2.8.5 Clocks and Timers page 49 line 2062 states that
CLOCK_PROCESS_CPUTIME_ID is defined in time.h when _POSIX_CPUTIME is
defined.

XSH section 2.8.5 Clocks and Timers page 50 line 2069 states that
CLOCK_THREAD_CPUTIME_ID is defined in time.h when 
_POSIX_THREAD_CPUTIME is defined

XSH  system interface, clock_getres() page 203 line 6787 states that
when _POSIX_CPUTIME is defined, implementations shall also support 
the special clockid_t value CLOCK_PROCESS_CPUTIME_ID

XSH  system interface, clock_getres() page 203 line 6796 states that 
when _POSIX_THREAD_CPUTIME is defined, implementations shall also 
support the special clockid_t value CLOCK_THREAD_CPUTIME_ID

XBD time.h page 393 line 13771 states that CLOCK_PROCESS_CPUTIME_ID 
is defined when either _POSIX_TIMERS or _POSIX_CPUTIME is defined.

XBD time.h page 393 line 13774 states that CLOCK_THREAD_CPUTIME_ID 
is defined when either _POSIX_TIMERS or _POSIX_THREAD_CPUTIME is 
defined.

The text in time.h should concur with that in the Clocks and Timers
section, XSI option Groups section.  The time.h specification should 
define CLOCK_PROCESS_CPUTIME_ID only when both _POSIX_TIMERS and 
_POSIX_CPUTIME are defined.  And time.h should define 
CLOCK_THREAD_CPUTIME_ID only when both _POSIX_TIMERS and 
_POSIX_THREAD_CPUTIME are defined.

Action:

In XBD time.h, in line 13771, change "TMR|CPT" to "TMR CPT"

In XBD time.h, in line 13774, change "TMR|TCT" to "TMR TCT"

<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XBD time.h, rajani.g.k <=