The file <sys/syscall.h>defines many macros SYS_(indirectly through bits/syscall.hon my system). For instance:
#define SYS_eventfd __NR_eventfd
#define SYS_eventfd2 __NR_eventfd2
#define SYS_execve __NR_execve
#define SYS_exit __NR_exit
#define SYS_exit_group __NR_exit_group
#define SYS_faccessat __NR_faccessat
, ? , , :
switch(code) {
#define syscode_case(x) case x: return
syscode_case(SYS_eventfd);
syscode_case(SYS_eventf2);
}
, , .
Edit:
man 2 syscall, :
#include <sys/syscall.h>` /* For SYS_xxx definitions