/* mod-syscall-xtimefun-test.c * * Call the new xtimefun module system call to return xtime.tv_sec. * Use the existing unused system call futex 240. * */ /* Standard include files for syscall, see man syscall */ #include /* for syscall */ #include #include /* for printf */ #include /* for struct timeval */ int main(void) { struct timeval now_xtime, now_ktime; printf("Hello, calling module xtimefun as futex 240 system call\n"); syscall(__NR_futex, &now_xtime, &now_ktime); printf("mod_syscall_xtimefun returned xtime.tv_sec: %ld xtime.tv_usec %ld\n",now_xtime.tv_sec, now_xtime.tv_usec); printf("mod_syscall_xtimefun returned ktime.tv_sec: %ld ktime.tv_usec %ld\n",now_ktime.tv_sec, now_ktime.tv_usec); printf("Done. Go check /var/log/syslog\n"); return 0; }