diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-05-31 00:15:49 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-04 16:40:27 +0300 |
commit | 63841b2a6969501de183efafc14d20175e402804 (patch) | |
tree | 6b2c0cd0919316ad07046e44bf97e1ef76b8fa62 /kernel/time/posix-timers.h | |
parent | 21e55c1f83880a56360287c00f2b5cd5e5a4a912 (diff) | |
download | linux-63841b2a6969501de183efafc14d20175e402804.tar.xz |
posix-timers: Add forward/remaining callbacks
Add two callbacks to kclock which allow using common_)timer_get() for both
hrtimer and alarm timer based clocks.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20170530211657.044915536@linutronix.de
Diffstat (limited to 'kernel/time/posix-timers.h')
-rw-r--r-- | kernel/time/posix-timers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h index 1f6f6f9a6a37..3bc5b74c342f 100644 --- a/kernel/time/posix-timers.h +++ b/kernel/time/posix-timers.h @@ -19,6 +19,8 @@ struct k_clock { void (*timer_get)(struct k_itimer *timr, struct itimerspec64 *cur_setting); void (*timer_rearm)(struct k_itimer *timr); + int (*timer_forward)(struct k_itimer *timr, ktime_t now); + ktime_t (*timer_remaining)(struct k_itimer *timr, ktime_t now); }; extern const struct k_clock clock_posix_cpu; |