This document provides words for the resolution of ballot comments BSI-12, AG-2, AG-3, AG-5, AG-6, AG-7, AG-8, AG-9, AG-10, AG-11. =========== BSI-12, AG-2, AG-9, AG-10, AG-11. Change para 3 of 7.26 <time.h> from "... which are arithmetic types capable of representing times; and struct tm which holds the components of a calendar time, called the broken-down time." To: "... which are arithmetic types capable of representing times; struct timespec which is a structure type that holds a time specified in whole seconds and nanoseconds, and struct tm which holds the components of a calendar time, called the broken-down time. Many of the timing facility functions accept or return time value specifications. A time value structure timespec specifies a single time value, and contains at least the following members, in any order. time_t tv_sec; long tv_nsec; The tv_sec member is a whole number of seconds since an implementation defined epoch. (footnote: the tv_sec field is a linear count of seconds and may not have the normal sematics of a time_t). The tv_nsec member is only valid if greater than or equal to zero, and less than the number of nanoseconds in a second (1 000 million). The time interval described by this structure is (tv_sec * 10^9 + tv_nsec) nanoseconds." Globally replace xtime with "timespec", the "sec" member with "tv_sec, and the "nsec" member with "tv_nsec". Change 7.25 <threads.h> para 4: and xtime which is a structure type that holds a time specified in seconds and nanoseconds. The structure shall contain at least the following members, in any order. time_t sec; long nsec; To Inclusion of the <threads.h> header shall also make visible all of the symbols defined in <time.h>. ====== Move 7.25.7 to 7.26.4, changing the title from "Time Functions" to "Other Time Functions" Add to 7.26.1 para 2: TIME_UTC which expands to a integer constant greater than 0 that describes one of perhaps several system time bases (footnote: implementations may define several other clocks, but are only required to support a real time clock based on Universal Coordinated Time) Rewrite the xtime_get function as follows: 7.26.4 Other Time functions 220.127.116.11 The time_get function Synopsis #include <time.h> int time_get(struct timespec *xt, int base); Description The time_get function sets the timespec object pointed to by xt to hold the current time based on the time base base. If base is TIME_UTC, the tv_sec field is set to the number of seconds truncated to a whole value since an implementation defined epoch. The tv_nsec field shall be set to the integral number of nanoseconds, rounded to the resolution of the system clock (footnote: Although a timespec object describes times with nanosecond resolution, the actual resolution in a timespec object is system dependent, and may be greater than 1 second). Returns If the time_get function is successful it returns the nonzero value base, otherwise, it returns zero. Add to Future Library Directions a new clause between 7.30.11 and 7.30.12: 7.30.12 Date and Time <time.h> Macro names beginning with TIME_ may be added to the macros defined in the <time.h> header. ======== AG-3 In 18.104.22.168, change: Synopsis #include <threads.h> int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt); To: Synopsis #include <threads.h> int cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx, const struct timespec *restrict abstime); At para 2, change "until after the time specified by the xtime object pointed to by xt" to until after the time specified by the timespec object pointed to by abstime, which represents an absolute time in time base TIME_UTC since the implementation defined epoch. ======== AG-5 In 22.214.171.124, change Synopsis #include <threads.h> int mtx_timedlock(mtx_t *mtx, const xtime *xt); To: Synopsis #include <threads.h> int mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict abstime); in para 2, change until the time specified by the xtime object xt has passed. To: until after the time specified by the timespec object pointed to by abstime, which represents an absolute time in time base TIME_UTC since the implementation defined epoch. ======== AG-7, AG-8 Change 126.96.36.199 from: 188.8.131.52 The thrd_sleep function Synopsis #include <threads.h> void thrd_sleep(const xtime *xt); Description The thrd_sleep function suspends execution of the calling thread until after the time specified by the xtime object pointed to by xt. Returns The thrd_sleep function returns no value. To: Synopsis #include <threads.h> int thrd_sleep(const struct timespec *duration, struct timespec *remaining); Description The thrd_sleep() function shall cause the current thread to be suspended from execution until either the time interval specified by the duration argument has elapsed or a signal is delivered to the calling thread, and its action is to invoke a signal-catching function or to terminate the program. The suspension time may be longer than requested because the argument value is rounded up to an integer multiple of the sleep resolution or because of the scheduling of other activity by the system. But, except for the case of being interrupted by a signal, the suspension time shall not be less than the time specified by duration, as measured by the system clock TIME_UTC. Returns If the thrd_sleep() function returns because the requested time has elapsed, its return value shall be zero. If the thrd_sleep() function returns because it has been interrupted by a signal, it shall return a value of -1. If the remaining argument is non-NULL, the timespec structure referenced by it is updated to contain the amount of time remaining in the interval (the requested time minus the time actually slept). The duration and remaining arguments may point to the same object. If the remaining argument is NULL, the remaining time is not returned. If thrd_sleep( ) fails, it shall return a negative value. ======== AG-6 Add a new para (para 3) to 184.108.40.206 Description: The program shall exit with an exit status of 0 after the last thread has been terminated. The behavior shall be as if the implementation called exit() with a zero argument at thread termination time. ======== AG-1 In 220.127.116.11, add to the end of para 2: If a signal is raised while the quick_exit function is executing, the behavior is undefined.