diff mbox

[v2] bits/time.h: synchronize CLOCK_* macros with glibc

Message ID 1406501998-423-1-git-send-email-jcmvbkbc@gmail.com
State Accepted
Headers show

Commit Message

Max Filippov July 27, 2014, 10:59 p.m. UTC
CLOCK_BOOTTIME is available since Linux 2.6.39, CLOCK_REALTIME_ALARM and
CLOCK_BOOTTIME_ALARM are available since Linux 3.0.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Changes v1->v2:
- add CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM definitions

 libc/sysdeps/linux/common/bits/time.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Max Filippov Aug. 8, 2014, 9:40 p.m. UTC | #1
On Mon, Jul 28, 2014 at 2:59 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> CLOCK_BOOTTIME is available since Linux 2.6.39, CLOCK_REALTIME_ALARM and
> CLOCK_BOOTTIME_ALARM are available since Linux 3.0.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Ping?
Bernhard Reutner-Fischer Aug. 14, 2014, 2:50 p.m. UTC | #2
On 8 August 2014 23:40, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Mon, Jul 28, 2014 at 2:59 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> CLOCK_BOOTTIME is available since Linux 2.6.39, CLOCK_REALTIME_ALARM and
>> CLOCK_BOOTTIME_ALARM are available since Linux 3.0.
>>
>> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
>
> Ping?

Thanks for the patch and sorry for the delayed response!
Mike already applied something to this effect.

thanks,
diff mbox

Patch

diff --git a/libc/sysdeps/linux/common/bits/time.h b/libc/sysdeps/linux/common/bits/time.h
index b397b60..71065e6 100644
--- a/libc/sysdeps/linux/common/bits/time.h
+++ b/libc/sysdeps/linux/common/bits/time.h
@@ -59,6 +59,12 @@ 
 #   define CLOCK_REALTIME_COARSE	5
 /* Monotonic system-wide clock, updated only on ticks.  */
 #   define CLOCK_MONOTONIC_COARSE	6
+/* Monotonic system-wide clock that includes time spent in suspension.  */
+#   define CLOCK_BOOTTIME		7
+/* Like CLOCK_REALTIME but also wakes suspended system.  */
+#   define CLOCK_REALTIME_ALARM		8
+/* Like CLOCK_BOOTTIME but also wakes suspended system.  */
+#   define CLOCK_BOOTTIME_ALARM		9
 
 /* Flag to indicate time is absolute.  */
 #   define TIMER_ABSTIME		1