1 #include <sys/time.h> 2 #include "syscall.h" 3 getitimer(int which,struct itimerval * old)4int getitimer(int which, struct itimerval *old) 5 { 6 if (sizeof(time_t) > sizeof(long)) { 7 long old32[4]; 8 int r = __syscall(SYS_getitimer, which, old32); 9 if (!r) { 10 old->it_interval.tv_sec = old32[0]; 11 old->it_interval.tv_usec = old32[1]; 12 old->it_value.tv_sec = old32[2]; 13 old->it_value.tv_usec = old32[3]; 14 } 15 return __syscall_ret(r); 16 } 17 return syscall(SYS_getitimer, which, old); 18 } 19