timer_getoverr.c 566 B

12345678910111213141516171819202122232425
  1. /*
  2. * timer-getoverr.c - get the timer overrun count.
  3. */
  4. #include <errno.h>
  5. #include <time.h>
  6. #include <sys/syscall.h>
  7. #include "kernel-posix-timers.h"
  8. #ifdef __NR_timer_getoverrun
  9. #define __NR___syscall_timer_getoverrun __NR_timer_getoverrun
  10. static inline _syscall1(int, __syscall_timer_getoverrun, kernel_timer_t, ktimerid);
  11. /* Get the timer overrun count */
  12. int timer_getoverrun(timer_t timerid)
  13. {
  14. struct timer *kt = (struct timer *) timerid;
  15. /* Get the information from the kernel */
  16. return __syscall_timer_getoverrun(kt->ktimerid);
  17. }
  18. #endif