aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/alarmtimer.h
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-05-15 17:38:11 -0400
committerJohn Stultz <john.stultz@linaro.org>2013-05-29 15:57:34 -0400
commit6cffe00f7d4e24679eae6b7aae4caaf915288256 (patch)
tree3613480b8eefec8b865ba9d3acbb8ecb7ffe4def /include/linux/alarmtimer.h
parent3565184ed0c1ea46bea5b792da5f72a83c43e49b (diff)
alarmtimer: Add functions for timerfd support
Add functions needed for hooking up alarmtimer to timerfd: * alarm_restart: Similar to hrtimer_restart, restart an alarmtimer after the expires time has already been updated (as with alarm_forward). * alarm_forward_now: Similar to hrtimer_forward_now, move the expires time forward to an interval from the current time of the associated clock. * alarm_start_relative: Start an alarmtimer with an expires time relative to the current time of the associated clock. * alarm_expires_remaining: Similar to hrtimer_expires_remaining, return the amount of time remaining until alarm expiry. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/alarmtimer.h')
-rw-r--r--include/linux/alarmtimer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h
index 9069694e70eb..a899402a5a0e 100644
--- a/include/linux/alarmtimer.h
+++ b/include/linux/alarmtimer.h
@@ -44,10 +44,14 @@ struct alarm {
44void alarm_init(struct alarm *alarm, enum alarmtimer_type type, 44void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
45 enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); 45 enum alarmtimer_restart (*function)(struct alarm *, ktime_t));
46int alarm_start(struct alarm *alarm, ktime_t start); 46int alarm_start(struct alarm *alarm, ktime_t start);
47int alarm_start_relative(struct alarm *alarm, ktime_t start);
48void alarm_restart(struct alarm *alarm);
47int alarm_try_to_cancel(struct alarm *alarm); 49int alarm_try_to_cancel(struct alarm *alarm);
48int alarm_cancel(struct alarm *alarm); 50int alarm_cancel(struct alarm *alarm);
49 51
50u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); 52u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);
53u64 alarm_forward_now(struct alarm *alarm, ktime_t interval);
54ktime_t alarm_expires_remaining(const struct alarm *alarm);
51 55
52/* Provide way to access the rtc device being used by alarmtimers */ 56/* Provide way to access the rtc device being used by alarmtimers */
53struct rtc_device *alarmtimer_get_rtcdev(void); 57struct rtc_device *alarmtimer_get_rtcdev(void);