Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245633
b: refs/heads/master
c: ff3ead9
h: refs/heads/master
i:
  245631: cc41f4e
v: v3
  • Loading branch information
John Stultz committed Apr 26, 2011
1 parent d8b0f5f commit 45d8f47
Show file tree
Hide file tree
Showing 4 changed files with 407 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88d19cf37952a7e1e38b2bf87a00f0e857e63180
refs/heads/master: ff3ead96d17f47ee70c294a5cc2cce9b61e82f0f
30 changes: 30 additions & 0 deletions trunk/include/linux/alarmtimer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#ifndef _LINUX_ALARMTIMER_H
#define _LINUX_ALARMTIMER_H

#include <linux/time.h>
#include <linux/hrtimer.h>
#include <linux/timerqueue.h>
#include <linux/rtc.h>

enum alarmtimer_type {
ALARM_REALTIME,
ALARM_BOOTTIME,

ALARM_NUMTYPE,
};

struct alarm {
struct timerqueue_node node;
ktime_t period;
void (*function)(struct alarm *);
enum alarmtimer_type type;
char enabled;
void *data;
};

void alarm_init(struct alarm *alarm, enum alarmtimer_type type,
void (*function)(struct alarm *));
void alarm_start(struct alarm *alarm, ktime_t start, ktime_t period);
void alarm_cancel(struct alarm *alarm);

#endif
2 changes: 1 addition & 1 deletion trunk/kernel/time/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-y += timekeeping.o ntp.o clocksource.o jiffies.o timer_list.o timecompare.o
obj-y += timeconv.o posix-clock.o
obj-y += timeconv.o posix-clock.o alarmtimer.o

obj-$(CONFIG_GENERIC_CLOCKEVENTS_BUILD) += clockevents.o
obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o
Expand Down
Loading

0 comments on commit 45d8f47

Please sign in to comment.