diff options
author | John Stultz <john.stultz@linaro.org> | 2011-08-10 15:41:36 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-08-10 17:55:29 -0400 |
commit | 9082c465a5403f4a98734193e078552991a2e283 (patch) | |
tree | 387e564f326488abe9ee84b0c723294ea573de1e /include/linux/alarmtimer.h | |
parent | a28cde81ab13cc251748a4c4ef06883dd09a10ea (diff) |
alarmtimers: Add try_to_cancel functionality
There's a number of edge cases when cancelling a alarm, so
to be sure we accurately do so, introduce try_to_cancel, which
returns proper failure errors if it cannot. Also modify cancel
to spin until the alarm is properly disabled.
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/alarmtimer.h')
-rw-r--r-- | include/linux/alarmtimer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h index 304124a6c982..975009e1cbe6 100644 --- a/include/linux/alarmtimer.h +++ b/include/linux/alarmtimer.h | |||
@@ -44,7 +44,8 @@ struct alarm { | |||
44 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, | 44 | void 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)); |
46 | void alarm_start(struct alarm *alarm, ktime_t start); | 46 | void alarm_start(struct alarm *alarm, ktime_t start); |
47 | void alarm_cancel(struct alarm *alarm); | 47 | int alarm_try_to_cancel(struct alarm *alarm); |
48 | int alarm_cancel(struct alarm *alarm); | ||
48 | 49 | ||
49 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); | 50 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); |
50 | 51 | ||