View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001346 | 1003.1(2016/18)/Issue7+TC2 | Base Definitions and Headers | public | 2020-05-26 13:44 | 2024-06-11 09:08 |
Reporter | markh | Assigned To | |||
Priority | normal | Severity | Comment | Type | Enhancement Request |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Mark Harris | ||||
Organization | |||||
User Reference | |||||
Section | 1.7.1 | ||||
Page Number | 8 | ||||
Line Number | 236 | ||||
Interp Status | --- | ||||
Final Accepted Text | See 0001346:0005157. | ||||
Summary | 0001346: Require support for CLOCK_MONOTONIC | ||||
Description | CLOCK_MONOTONIC was introduced in Issue 6, but only as an optional feature. However many applications require the use of a clock that cannot have negative time jumps. A monotonic clock is not an obscure feature, and is widely available via non-POSIX interfaces. For example, C++ applications (since C++11) can rely on std::chrono::steady_clock, Java applications (since Java 7) can rely on System.nanoTime(), Python applications (since Python 3.5) can rely on time.monotonic(), macOS and iOS applications can rely on mach_absolute_time(), and Windows applications (since Windows 2000) can rely on QueryPerformanceCounter(). Many applications targeting POSIX just assume that CLOCK_MONOTONIC is available, but others that are trying to be more portable use checks that are difficult to get right and test, and may still fail on a system conforming to the latest revision of POSIX if CLOCK_MONOTONIC works with some interfaces (like clock_gettime()) but not others (like clock_nanosleep()). The addition of new interfaces such as pthread_cond_clockwait() (#1216) will make correct checking even more complex for applications that wish to use the new interfaces, but also support the possibility allowed by the standard that they may not be usable with CLOCK_MONOTONIC. A properly functioning monotonic clock is important and applications relying on Issue 8 should not be burdened with additional checks or fallbacks; they should be able to rely on a monotonic clock being available, as C++ applications, Java applications, Python applications, and macOS, iOS, and Windows applications have been able to do for years. | ||||
Desired Action | For Issue 8, require support for the Monotonic Clock option, and require that CLOCK_MONOTONIC be supported by all standard interfaces that accept a clock id except clock_settime(). | ||||
Tags | issue8 |
|
All page and line numbers are against Issue 7 2018 edition (C181). Delete page 8 lines 235-240 (XBD 1.7.1 Codes, MON) and remove the MON shading throughout:
On page 18 line 586 (XBD 2.1.3 POSIX Conformance), move _POSIX_MONOTONIC_CLOCK to a new list of symbolic constants for Issue 8 under page 17 line 552. Delete page 23 line 818 and page 24 line 826. On page 275 line 9235 (<limits.h>) change: If the Monotonic Clock option is supported, the ...to: The ... and remove the [MON] shading. On page 436 lines 14851 - 14854, change _POSIX_MONOTONIC_CLOCKtoThe implementation supports the Monotonic Clock option. If this symbol is defined in <unistd.h>, it shall be defined to be −1, 0, or 200809L. The value of this symbol reported by sysconf( ) shall either be −1 or 200809L. _POSIX_MONOTONIC_CLOCKThe implementation supports a monotonic clock. This symbol shall always be set to the value 20yymmL. and remove the [MON] shading. On page 679 line 23272 (XSH clock_getres() description), change: If the Monotonic Clock option is supported, all ...to: All ... and remove the [MON] shading. On page 1986 lines 63922-63923 (XSH sigtimedwait() ) change: If the Monotonic Clock option is supported, the ...to: The ... and remove the [MON] shading. On page 2151 lines 68909-68910 change: All implementations shall support a clock_id of CLOCK_REALTIME. If the Monotonic Clock option is supported, implementations shall support a clock_id of CLOCK_MONOTONIC.to: All implementations shall support CLOCK_REALTIME and CLOCK_MONOTONIC as values for clock_id. and remove the [MON] shading. On page 3485 line 117753 section A.2.1.3 change: The following options from the previous version of this standard are now mandatoryto: The following options from previous versions of this standard are now mandatory and add _POSIX_MONOTONIC_CLOCK to the list following that text. On page 3779 line 129738 section D.3.4, change: The system supports the Monotonic Clock option.to: Support for a monotonic clock is mandatory in POSIX.1-202x. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-05-26 13:44 | markh | New Issue | |
2020-05-26 13:44 | markh | Name | => Mark Harris |
2020-05-26 13:44 | markh | Section | => 1.7.1 |
2020-05-26 13:44 | markh | Page Number | => 8 |
2020-05-26 13:44 | markh | Line Number | => 236 |
2020-12-03 17:21 | Don Cragun | Note Added: 0005157 | |
2020-12-03 17:23 | Don Cragun | Interp Status | => --- |
2020-12-03 17:23 | Don Cragun | Final Accepted Text | => See 0001346:0005157. |
2020-12-03 17:23 | Don Cragun | Status | New => Resolved |
2020-12-03 17:23 | Don Cragun | Resolution | Open => Accepted As Marked |
2020-12-03 17:23 | Don Cragun | Tag Attached: issue8 | |
2020-12-03 17:31 | Don Cragun | Note Edited: 0005157 | |
2020-12-03 17:32 | rhansen | Note Edited: 0005157 | |
2020-12-03 17:33 | Don Cragun | Note Edited: 0005157 | |
2020-12-16 16:33 | geoffclare | Status | Resolved => Applied |
2024-06-11 09:08 | agadmin | Status | Applied => Closed |