]> git.proxmox.com Git - mirror_lxcfs.git/blob - src/syscall_numbers.h
tree-wide: set _GNU_SOURCE in meson.build
[mirror_lxcfs.git] / src / syscall_numbers.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #ifndef __LXCFS_SYSCALL_NUMBERS_H
3 #define __LXCFS_SYSCALL_NUMBERS_H
4
5 #include "config.h"
6
7 #include <asm/unistd.h>
8 #include <errno.h>
9 #include <sched.h>
10 #include <stdint.h>
11 #include <sys/syscall.h>
12 #include <sys/types.h>
13 #include <unistd.h>
14
15 #ifndef __NR_pivot_root
16 #if defined __i386__
17 #define __NR_pivot_root 217
18 #elif defined __x86_64__
19 #define __NR_pivot_root 155
20 #elif defined __arm__
21 #define __NR_pivot_root 218
22 #elif defined __aarch64__
23 #define __NR_pivot_root 218
24 #elif defined __s390__
25 #define __NR_pivot_root 217
26 #elif defined __powerpc__
27 #define __NR_pivot_root 203
28 #elif defined __sparc__
29 #define __NR_pivot_root 146
30 #elif defined __ia64__
31 #define __NR_pivot_root 183
32 #elif defined _MIPS_SIM
33 #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
34 #define __NR_pivot_root 4216
35 #endif
36 #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
37 #define __NR_pivot_root 6151
38 #endif
39 #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
40 #define __NR_pivot_root 5151
41 #endif
42 #else
43 #define -1
44 #warning "__NR_pivot_root not defined for your architecture"
45 #endif
46 #endif
47
48 #ifndef __NR_bpf
49 #if defined __i386__
50 #define __NR_bpf 357
51 #elif defined __x86_64__
52 #define __NR_bpf 321
53 #elif defined __arm__
54 #define __NR_bpf 386
55 #elif defined __aarch64__
56 #define __NR_bpf 386
57 #elif defined __s390__
58 #define __NR_bpf 351
59 #elif defined __powerpc__
60 #define __NR_bpf 361
61 #elif defined __sparc__
62 #define __NR_bpf 349
63 #elif defined __ia64__
64 #define __NR_bpf 317
65 #elif defined _MIPS_SIM
66 #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
67 #define __NR_bpf 4355
68 #endif
69 #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
70 #define __NR_bpf 6319
71 #endif
72 #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
73 #define __NR_bpf 5315
74 #endif
75 #else
76 #define -1
77 #warning "__NR_bpf not defined for your architecture"
78 #endif
79 #endif
80
81 #ifndef __NR_pidfd_send_signal
82 #if defined __alpha__
83 #define __NR_pidfd_send_signal 534
84 #elif defined _MIPS_SIM
85 #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
86 #define __NR_pidfd_send_signal 4424
87 #endif
88 #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
89 #define __NR_pidfd_send_signal 6424
90 #endif
91 #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
92 #define __NR_pidfd_send_signal 5424
93 #endif
94 #else
95 #define __NR_pidfd_send_signal 424
96 #endif
97 #endif
98
99 #ifndef __NR_pidfd_open
100 #if defined __alpha__
101 #define __NR_pidfd_open 544
102 #elif defined _MIPS_SIM
103 #if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
104 #define __NR_pidfd_open 4434
105 #endif
106 #if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
107 #define __NR_pidfd_open 6434
108 #endif
109 #if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
110 #define __NR_pidfd_open 5434
111 #endif
112 #else
113 #define __NR_pidfd_open 434
114 #endif
115 #endif
116
117 #endif /* __LXCFS_SYSCALL_NUMBERS_H */