diff options
author | Todd Poynor <toddpoynor@google.com> | 2013-05-15 14:38:11 -0700 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:55 +0900 |
commit | d3054e50b82019c3a261e54aa2601628a2aca025 (patch) | |
tree | 817db44c058fa3ab4a62014d5122a0fbb31bdddd /include/linux | |
parent | e66e1d1c69f0620644f16057bc79b6634f8fef66 (diff) | |
download | linux-3.10-d3054e50b82019c3a261e54aa2601628a2aca025.tar.gz linux-3.10-d3054e50b82019c3a261e54aa2601628a2aca025.tar.bz2 linux-3.10-d3054e50b82019c3a261e54aa2601628a2aca025.zip |
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.
Change-Id: I609e268d53725b2c2b62b618ccc388f4329997f5
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/alarmtimer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h index 9069694e70e..a899402a5a0 100644 --- a/include/linux/alarmtimer.h +++ b/include/linux/alarmtimer.h @@ -44,10 +44,14 @@ struct alarm { void alarm_init(struct alarm *alarm, enum alarmtimer_type type, enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); int alarm_start(struct alarm *alarm, ktime_t start); +int alarm_start_relative(struct alarm *alarm, ktime_t start); +void alarm_restart(struct alarm *alarm); int alarm_try_to_cancel(struct alarm *alarm); int alarm_cancel(struct alarm *alarm); u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); +u64 alarm_forward_now(struct alarm *alarm, ktime_t interval); +ktime_t alarm_expires_remaining(const struct alarm *alarm); /* Provide way to access the rtc device being used by alarmtimers */ struct rtc_device *alarmtimer_get_rtcdev(void); |