summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-05-30 23:15:52 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-06-04 15:40:28 +0200
commit525b8ed91671e29e187dfe02d408b11190ccf494 (patch)
tree1610aab48342bdb29da3b911679a066f4b74c38c /kernel
parentposix-timers: Zero settings value in common code (diff)
downloadlinux-525b8ed91671e29e187dfe02d408b11190ccf494.tar.xz
linux-525b8ed91671e29e187dfe02d408b11190ccf494.zip
posix-timers: Add cancel/arm callbacks
Add timer_try_to_cancel() and timer_arm() callbacks to kclock which allow to make common_timer_set() usable by both hrtimer and alarmtimer 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.278022962@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/posix-timers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h
index 3bc5b74c342f..b0ad77e18886 100644
--- a/kernel/time/posix-timers.h
+++ b/kernel/time/posix-timers.h
@@ -21,6 +21,9 @@ struct k_clock {
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);
+ int (*timer_try_to_cancel)(struct k_itimer *timr);
+ void (*timer_arm)(struct k_itimer *timr, ktime_t expires,
+ bool absolute, bool sigev_none);
};
extern const struct k_clock clock_posix_cpu;