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 <kaber@trash.net>
This commit is contained in:
parent
d84f619c3a
commit
293fb1e809
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* libdect timer handling
|
||||
*
|
||||
* Copyright (c) 2009-2010 Patrick McHardy <kaber@trash.net>
|
||||
*/
|
||||
|
||||
#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 */
|
|
@ -8,6 +8,7 @@
|
|||
#define _LIBDECT_TIMER_H
|
||||
|
||||
#include <utils.h>
|
||||
#include <dect/timer.h>
|
||||
|
||||
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 */
|
||||
|
|
|
@ -68,6 +68,12 @@ void *dect_timer_priv(struct dect_timer *timer)
|
|||
}
|
||||
EXPORT_SYMBOL(dect_timer_priv);
|
||||
|
||||
void *dect_timer_data(const struct dect_timer *timer)
|
||||
{
|
||||
return timer->data;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_timer_data);
|
||||
|
||||
void dect_timer_setup(struct dect_timer *timer,
|
||||
void (*cb)(struct dect_handle *, struct dect_timer *),
|
||||
void *data)
|
||||
|
|
Reference in New Issue