From 26e8964b9db51e27cc6eaf5510ebc8eac8443f33 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 6 Mar 2015 13:17:20 +0100 Subject: lib/timer: use separate file for timers It seems that static builds require -lpthread for timer_* functions. It's better to keep it out of our libs (e.g. libmount) to avoid unnecessary dependence. Signed-off-by: Karel Zak --- include/timer.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 include/timer.h (limited to 'include/timer.h') diff --git a/include/timer.h b/include/timer.h new file mode 100644 index 000000000..aa9f9c018 --- /dev/null +++ b/include/timer.h @@ -0,0 +1,11 @@ +#ifndef UTIL_LINUX_TIMER_H +#define UTIL_LINUX_TIMER_H + +#include +#include + +extern int setup_timer(timer_t * t_id, struct itimerval *timeout, + void (*timeout_handler)(int, siginfo_t *, void *)); +extern void cancel_timer(timer_t * t_id); + +#endif /* UTIL_LINUX_TIMER_H */ -- cgit v1.2.3-55-g7522