include/timer: return setitimer return value
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
d4543f843d
commit
77fa36d7c6
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
static inline void setup_timer(
|
static inline int setup_timer(
|
||||||
struct itimerval *timer,
|
struct itimerval *timer,
|
||||||
struct itimerval *old_timer,
|
struct itimerval *old_timer,
|
||||||
struct sigaction *old_sa,
|
struct sigaction *old_sa,
|
||||||
|
@ -17,7 +17,7 @@ static inline void setup_timer(
|
||||||
sa.sa_flags = SA_RESETHAND;
|
sa.sa_flags = SA_RESETHAND;
|
||||||
sigaction(SIGALRM, &sa, old_sa);
|
sigaction(SIGALRM, &sa, old_sa);
|
||||||
|
|
||||||
setitimer(ITIMER_REAL, timer, old_timer);
|
return setitimer(ITIMER_REAL, timer, old_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cancel_timer(
|
static inline void cancel_timer(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue