/* syscall-test.c * * Call the new system calls */ /* Standard include files for syscall, see man syscall */ #include #include #include /* for printf */ int main(void) { /* just use the existing future system call numbers which are * futex 240, sched_setaffinity 241, sched_getaffinity 242 */ int n; char * msg = "Hi there"; printf("Hello, calling my_syscall 240 system call\n"); syscall(__NR_futex); printf("Hello, calling my_syscall_ret 241 system call\n"); n = syscall(__NR_sched_setaffinity); printf("my_syscall_ret 241 returned: %d\n",n); printf("Hello, calling my_syscall_parm 242 system call\n"); n = syscall(__NR_sched_getaffinity, msg); printf("my_syscall_parm 242 returned: %d\n",n); printf("Done. Go check /var/log/syslog\n"); return 0; }