aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/alarmtimer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h
index c5d6095b46f8..0289eb29e794 100644
--- a/include/linux/alarmtimer.h
+++ b/include/linux/alarmtimer.h
@@ -13,6 +13,11 @@ enum alarmtimer_type {
13 ALARM_NUMTYPE, 13 ALARM_NUMTYPE,
14}; 14};
15 15
16enum alarmtimer_restart {
17 ALARMTIMER_NORESTART,
18 ALARMTIMER_RESTART,
19};
20
16/** 21/**
17 * struct alarm - Alarm timer structure 22 * struct alarm - Alarm timer structure
18 * @node: timerqueue node for adding to the event list this value 23 * @node: timerqueue node for adding to the event list this value
@@ -26,14 +31,14 @@ enum alarmtimer_type {
26struct alarm { 31struct alarm {
27 struct timerqueue_node node; 32 struct timerqueue_node node;
28 ktime_t period; 33 ktime_t period;
29 void (*function)(struct alarm *); 34 enum alarmtimer_restart (*function)(struct alarm *, ktime_t now);
30 enum alarmtimer_type type; 35 enum alarmtimer_type type;
31 bool enabled; 36 bool enabled;
32 void *data; 37 void *data;
33}; 38};
34 39
35void alarm_init(struct alarm *alarm, enum alarmtimer_type type, 40void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
36 void (*function)(struct alarm *)); 41 enum alarmtimer_restart (*function)(struct alarm *, ktime_t));
37void alarm_start(struct alarm *alarm, ktime_t start, ktime_t period); 42void alarm_start(struct alarm *alarm, ktime_t start, ktime_t period);
38void alarm_cancel(struct alarm *alarm); 43void alarm_cancel(struct alarm *alarm);
39 44