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 #ifndef __LITEOS_A__ 7 if (sizeof(time_t) > sizeof(long)) { 8 long old32[4]; 9 int r = __syscall(SYS_getitimer, which, old32); 10 if (!r) { 11 old->it_interval.tv_sec = old32[0]; 12 old->it_interval.tv_usec = old32[1]; 13 old->it_value.tv_sec = old32[2]; 14 old->it_value.tv_usec = old32[3]; 15 } 16 return __syscall_ret(r); 17 } 18 #endif 19 return syscall(SYS_getitimer, which, old); 20 } 21