From 293fb1e809dc73d71bd67f07d8539323065e1809 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 15 Nov 2010 19:02:02 +0100 Subject: timer: export timer functions declarations The functions are already exported, also export the declarations since they are useful and easier to use than f.i. using libevent directly. Signed-off-by: Patrick McHardy --- include/dect/timer.h | 22 ++++++++++++++++++++++ include/timer.h | 11 +---------- 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 include/dect/timer.h (limited to 'include') diff --git a/include/dect/timer.h b/include/dect/timer.h new file mode 100644 index 0000000..dbca28b --- /dev/null +++ b/include/dect/timer.h @@ -0,0 +1,22 @@ +/* + * libdect timer handling + * + * Copyright (c) 2009-2010 Patrick McHardy + */ + +#ifndef _LIBDECT_DECT_TIMER_H +#define _LIBDECT_DECT_TIMER_H + +extern struct dect_timer *dect_timer_alloc(const struct dect_handle *dh); +extern void dect_timer_free(const struct dect_handle *dh, struct dect_timer *timer); +extern void dect_timer_setup(struct dect_timer *timer, + void (*cb)(struct dect_handle *, struct dect_timer *), + void *data); +extern void dect_timer_start(const struct dect_handle *dh, + struct dect_timer *timer, unsigned int timeout); +extern void dect_timer_stop(const struct dect_handle *dh, struct dect_timer *timer); +extern bool dect_timer_running(const struct dect_timer *timer); + +extern void *dect_timer_data(const struct dect_timer *timer); + +#endif /* _LIBDECT_DECT_TIMER_H */ diff --git a/include/timer.h b/include/timer.h index 5ff9033..665add4 100644 --- a/include/timer.h +++ b/include/timer.h @@ -8,6 +8,7 @@ #define _LIBDECT_TIMER_H #include +#include struct dect_handle; @@ -32,14 +33,4 @@ struct dect_timer { uint8_t priv[] __aligned(__alignof__(uint64_t)); }; -extern struct dect_timer *dect_timer_alloc(const struct dect_handle *dh); -extern void dect_timer_free(const struct dect_handle *dh, struct dect_timer *timer); -extern void dect_timer_setup(struct dect_timer *timer, - void (*cb)(struct dect_handle *, struct dect_timer *), - void *data); -extern void dect_timer_start(const struct dect_handle *dh, - struct dect_timer *timer, unsigned int timeout); -extern void dect_timer_stop(const struct dect_handle *dh, struct dect_timer *timer); -extern bool dect_timer_running(const struct dect_timer *timer); - #endif /* _LIBDECT_TIMER_H */ -- cgit v1.2.3