Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
linux
alarmtimer.h
Go to the documentation of this file.
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
9
enum
alarmtimer_type
{
10
ALARM_REALTIME
,
11
ALARM_BOOTTIME
,
12
13
ALARM_NUMTYPE
,
14
};
15
16
enum
alarmtimer_restart
{
17
ALARMTIMER_NORESTART
,
18
ALARMTIMER_RESTART
,
19
};
20
21
22
#define ALARMTIMER_STATE_INACTIVE 0x00
23
#define ALARMTIMER_STATE_ENQUEUED 0x01
24
35
struct
alarm
{
36
struct
timerqueue_node
node
;
37
struct
hrtimer
timer
;
38
enum
alarmtimer_restart
(*
function
)(
struct
alarm
*,
ktime_t
now);
39
enum
alarmtimer_type
type
;
40
int
state
;
41
void
*
data
;
42
};
43
44
void
alarm_init
(
struct
alarm
*
alarm
,
enum
alarmtimer_type
type
,
45
enum
alarmtimer_restart
(*
function
)(
struct
alarm *,
ktime_t
));
46
int
alarm_start
(
struct
alarm *alarm,
ktime_t
start
);
47
int
alarm_try_to_cancel
(
struct
alarm *alarm);
48
int
alarm_cancel
(
struct
alarm *alarm);
49
50
u64
alarm_forward
(
struct
alarm *alarm,
ktime_t
now,
ktime_t
interval
);
51
52
/* Provide way to access the rtc device being used by alarmtimers */
53
struct
rtc_device
*
alarmtimer_get_rtcdev
(
void
);
54
55
#endif
Generated on Thu Jan 10 2013 14:51:01 for Linux Kernel by
1.8.2