xref: /openbmc/linux/samples/bpf/syscall_nrs.c (revision bb4b5c08)
1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
24b7190e8SDavid Daney #include <uapi/linux/unistd.h>
34b7190e8SDavid Daney #include <linux/kbuild.h>
44b7190e8SDavid Daney 
54b7190e8SDavid Daney #define SYSNR(_NR) DEFINE(SYS ## _NR, _NR)
64b7190e8SDavid Daney 
syscall_defines(void)74b7190e8SDavid Daney void syscall_defines(void)
84b7190e8SDavid Daney {
94b7190e8SDavid Daney 	COMMENT("Linux system call numbers.");
104b7190e8SDavid Daney 	SYSNR(__NR_write);
114b7190e8SDavid Daney 	SYSNR(__NR_read);
12bb4b5c08SIvan Khoronzhuk #ifdef __NR_mmap2
13bb4b5c08SIvan Khoronzhuk 	SYSNR(__NR_mmap2);
14bb4b5c08SIvan Khoronzhuk #endif
15bb4b5c08SIvan Khoronzhuk #ifdef __NR_mmap
164b7190e8SDavid Daney 	SYSNR(__NR_mmap);
17bb4b5c08SIvan Khoronzhuk #endif
18bb4b5c08SIvan Khoronzhuk 
194b7190e8SDavid Daney }
20