123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #include <errno.h>
- #include <time.h>
- #include <sysdep.h>
- #include <bits/kernel-features.h>
- #include "kernel-posix-timers.h"
- #ifdef __NR_timer_getoverrun
- # ifndef __ASSUME_POSIX_TIMERS
- static int compat_timer_getoverrun (timer_t timerid);
- # define timer_getoverrun static compat_timer_getoverrun
- # include <nptl/sysdeps/pthread/timer_getoverr.c>
- # undef timer_getoverrun
- # endif
- # ifdef timer_getoverrun_alias
- # define timer_getoverrun timer_getoverrun_alias
- # endif
- int
- timer_getoverrun (
- timer_t timerid)
- {
- # undef timer_getoverrun
- # ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
- # endif
- {
- struct timer *kt = (struct timer *) timerid;
-
- int res = INLINE_SYSCALL (timer_getoverrun, 1, kt->ktimerid);
- # ifndef __ASSUME_POSIX_TIMERS
- if (res != -1 || errno != ENOSYS)
- {
-
- __no_posix_timers = 1;
- # endif
- return res;
- # ifndef __ASSUME_POSIX_TIMERS
- }
- # endif
- # ifndef __ASSUME_POSIX_TIMERS
- __no_posix_timers = -1;
- # endif
- }
- # ifndef __ASSUME_POSIX_TIMERS
- return compat_timer_getoverrun (timerid);
- # endif
- }
- #else
- # ifdef timer_getoverrun_alias
- # define timer_getoverrun timer_getoverrun_alias
- # endif
- # include <nptl/sysdeps/pthread/timer_getoverr.c>
- #endif
|