diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-10-16 21:53:58 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-10-16 21:53:58 +0000 |
commit | 01bf0593df8c7bb302f4d5cee139db837faf28d2 (patch) | |
tree | 3aa59d040d594b99e6f4f9fefdce2fa1294edc67 /newlib/libc | |
parent | f7b03c3c5b2114d84ffc8a37d68b5082e4f4a13d (diff) | |
download | cygnal-01bf0593df8c7bb302f4d5cee139db837faf28d2.tar.gz cygnal-01bf0593df8c7bb302f4d5cee139db837faf28d2.tar.bz2 cygnal-01bf0593df8c7bb302f4d5cee139db837faf28d2.zip |
2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/time.h: Add CLOCK_MONOTONIC.
* libc/include/sys/features.h: Define
_POSIX_MONOTONIC_CLOCK for RTEMS.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/sys/features.h | 1 | ||||
-rw-r--r-- | newlib/libc/include/time.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h index f16263f8d..23ea74802 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -38,6 +38,7 @@ extern "C" { #define _POSIX_MEMLOCK_RANGE 1 #define _POSIX_MEMORY_PROTECTION 1 #define _POSIX_MESSAGE_PASSING 1 +#define _POSIX_MONOTONIC_CLOCK 1 #define _POSIX_PRIORITIZED_IO 1 #define _POSIX_PRIORITY_SCHEDULING 1 #define _POSIX_REALTIME_SIGNALS 1 diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h index 8d3a30c8a..bc07d30f6 100644 --- a/newlib/libc/include/time.h +++ b/newlib/libc/include/time.h @@ -226,6 +226,16 @@ extern "C" { #endif +#if defined(_POSIX_MONOTONIC_CLOCK) + +/* The identifier for the system-wide monotonic clock, which is defined + * as a clock whose value cannot be set via clock_settime() and which + * cannot have backward clock jumps. */ + +#define CLOCK_MONOTONIC (clockid_t)4 + +#endif + #if defined(_POSIX_CPUTIME) /* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */ |