timer_getoverr.c 563 B

1234567891011121314151617181920212223242526
  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,
  11. ktimerid);
  12. /* Get the timer overrun count */
  13. int timer_getoverrun(timer_t timerid)
  14. {
  15. struct timer *kt = (struct timer *)timerid;
  16. /* Get the information from the kernel */
  17. return __syscall_timer_getoverrun(kt->ktimerid);
  18. }
  19. #endif