summaryrefslogtreecommitdiffstats
path: root/src/alarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alarm.c')
-rw-r--r--src/alarm.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/alarm.c b/src/alarm.c
index 2c65ef3..6edf68e 100644
--- a/src/alarm.c
+++ b/src/alarm.c
@@ -27,22 +27,13 @@
static LIST_HEAD(alarm_list);
-void set_alarm_function(struct alarm_list *t,
- void (*fcn)(struct alarm_list *a, void *data))
-{
- t->function = fcn;
-}
-
-void set_alarm_data(struct alarm_list *t, void *data)
-{
- t->data = data;
-}
-
-void init_alarm(struct alarm_list *t)
+void init_alarm(struct alarm_list *t,
+ void *data,
+ void (*fcn)(struct alarm_list *a, void *data))
{
timerclear(&t->tv);
- t->data = 0;
- t->function = NULL;
+ t->data = data;
+ t->function = fcn;
}
void __add_alarm(struct alarm_list *alarm)