]> git.baikalelectronics.ru Git - kernel.git/commit
timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock
authorThomas Gleixner <tglx@linutronix.de>
Thu, 1 Mar 2018 16:33:32 +0000 (17:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 13 Mar 2018 06:34:21 +0000 (07:34 +0100)
commitbf56cffd6832d79814c2cf41718331392675bfd6
treeca7a4e1337c8f56b404e4d7af0de73115fee88ce
parentabee4d2422ddfd0a0a2dad610d347a5ab0dba452
timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock

The planned change to unify the behaviour of the MONOTONIC and BOOTTIME
clocks vs. suspend removes the ability to retrieve the active
non-suspended time of a system.

Provide a new CLOCK_MONOTONIC_ACTIVE clock which returns the active
non-suspended time of the system via clock_gettime().

This preserves the old behaviour of CLOCK_MONOTONIC before the
BOOTTIME/MONOTONIC unification.

This new clock also allows applications to detect programmatically that
the MONOTONIC and BOOTTIME clocks are identical.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kevin Easton <kevin@guarana.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20180301165149.965235774@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/timekeeper_internal.h
include/linux/timekeeping.h
include/uapi/linux/time.h
kernel/time/posix-stubs.c
kernel/time/posix-timers.c
kernel/time/timekeeping.c