alarmtimers: Remove period from alarm structure
[deliverable/linux.git] / include / linux / alarmtimer.h
CommitLineData
ff3ead96
JS
1#ifndef _LINUX_ALARMTIMER_H
2#define _LINUX_ALARMTIMER_H
3
4#include <linux/time.h>
5#include <linux/hrtimer.h>
6#include <linux/timerqueue.h>
7#include <linux/rtc.h>
8
9enum alarmtimer_type {
10 ALARM_REALTIME,
11 ALARM_BOOTTIME,
12
13 ALARM_NUMTYPE,
14};
15
4b41308d
JS
16enum alarmtimer_restart {
17 ALARMTIMER_NORESTART,
18 ALARMTIMER_RESTART,
19};
20
180bf812
JS
21/**
22 * struct alarm - Alarm timer structure
23 * @node: timerqueue node for adding to the event list this value
24 * also includes the expiration time.
25 * @period: Period for recuring alarms
26 * @function: Function pointer to be executed when the timer fires.
27 * @type: Alarm type (BOOTTIME/REALTIME)
28 * @enabled: Flag that represents if the alarm is set to fire or not
29 * @data: Internal data value.
30 */
ff3ead96
JS
31struct alarm {
32 struct timerqueue_node node;
4b41308d 33 enum alarmtimer_restart (*function)(struct alarm *, ktime_t now);
ff3ead96 34 enum alarmtimer_type type;
180bf812 35 bool enabled;
ff3ead96
JS
36 void *data;
37};
38
39void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
4b41308d 40 enum alarmtimer_restart (*function)(struct alarm *, ktime_t));
9e264762 41void alarm_start(struct alarm *alarm, ktime_t start);
ff3ead96
JS
42void alarm_cancel(struct alarm *alarm);
43
dce75a8c
JS
44u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval);
45
ff3ead96 46#endif
This page took 0.143247 seconds and 5 git commands to generate.