xref: /linux/samples/bpf/syscall_nrs.c (revision fcc79e1714e8c2b8e216dc3149812edd37884eef)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <uapi/linux/unistd.h>
3 #include <linux/kbuild.h>
4 
5 #pragma GCC diagnostic push
6 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
7 
8 #define SYSNR(_NR) DEFINE(SYS ## _NR, _NR)
9 
10 void syscall_defines(void)
11 {
12 	COMMENT("Linux system call numbers.");
13 	SYSNR(__NR_write);
14 	SYSNR(__NR_read);
15 #ifdef __NR_mmap2
16 	SYSNR(__NR_mmap2);
17 #endif
18 #ifdef __NR_mmap
19 	SYSNR(__NR_mmap);
20 #endif
21 
22 }
23 
24 #pragma GCC diagnostic pop
25