2 * timer_gettime.c - get the timer value.
8 #include <sys/syscall.h>
10 #include "kernel-posix-timers.h"
12 #ifdef __NR_timer_gettime
14 #define __NR___syscall_timer_gettime __NR_timer_gettime
15 static __inline__
_syscall2(int, __syscall_timer_gettime
, kernel_timer_t
, ktimerid
,
18 /* Get the amount of time left on a timer */
19 int timer_gettime(timer_t timerid
, struct itimerspec
*value
)
21 struct timer
*kt
= (struct timer
*)timerid
;
23 /* Get timeout from the kernel */
24 return __syscall_timer_gettime(kt
->ktimerid
, value
);