Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
alarmtimer.h File Reference
#include <linux/time.h>
#include <linux/hrtimer.h>
#include <linux/timerqueue.h>
#include <linux/rtc.h>

Go to the source code of this file.

Data Structures

struct  alarm
 

Macros

#define ALARMTIMER_STATE_INACTIVE   0x00
 
#define ALARMTIMER_STATE_ENQUEUED   0x01
 

Enumerations

enum  alarmtimer_type { ALARM_REALTIME, ALARM_BOOTTIME, ALARM_NUMTYPE }
 
enum  alarmtimer_restart { ALARMTIMER_NORESTART, ALARMTIMER_RESTART }
 

Functions

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_try_to_cancel (struct alarm *alarm)
 
int alarm_cancel (struct alarm *alarm)
 
u64 alarm_forward (struct alarm *alarm, ktime_t now, ktime_t interval)
 
struct rtc_devicealarmtimer_get_rtcdev (void)
 

Macro Definition Documentation

#define ALARMTIMER_STATE_ENQUEUED   0x01

Definition at line 23 of file alarmtimer.h.

#define ALARMTIMER_STATE_INACTIVE   0x00

Definition at line 22 of file alarmtimer.h.

Enumeration Type Documentation

Enumerator:
ALARMTIMER_NORESTART 
ALARMTIMER_RESTART 

Definition at line 16 of file alarmtimer.h.

Enumerator:
ALARM_REALTIME 
ALARM_BOOTTIME 
ALARM_NUMTYPE 

Definition at line 9 of file alarmtimer.h.

Function Documentation

int alarm_cancel ( struct alarm alarm)

alarm_cancel - Spins trying to cancel an alarm timer until it is done : ptr to alarm to be canceled

Returns 1 if the timer was canceled, 0 if it was not active.

Definition at line 355 of file alarmtimer.c.

u64 alarm_forward ( struct alarm alarm,
ktime_t  now,
ktime_t  interval 
)

Definition at line 366 of file alarmtimer.c.

void alarm_init ( struct alarm alarm,
enum alarmtimer_type  type,
enum alarmtimer_restart(*)(struct alarm *, ktime_t function 
)

alarm_init - Initialize an alarm structure : ptr to alarm to be initialized : the type of the alarm : callback that is run when the alarm fires

Definition at line 295 of file alarmtimer.c.

int alarm_start ( struct alarm alarm,
ktime_t  start 
)

alarm_start - Sets an alarm to fire : ptr to alarm to set : time to run the alarm

Definition at line 312 of file alarmtimer.c.

int alarm_try_to_cancel ( struct alarm alarm)

alarm_try_to_cancel - Tries to cancel an alarm timer : ptr to alarm to be canceled

Returns 1 if the timer was canceled, 0 if it was not running, and -1 if the callback was running

Definition at line 334 of file alarmtimer.c.

struct rtc_device* alarmtimer_get_rtcdev ( void  )
read

Definition at line 119 of file alarmtimer.c.