• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef FIO_OS_LINUX_SYSCALL_H
2 #define FIO_OS_LINUX_SYSCALL_H
3 
4 #include "../arch/arch.h"
5 
6 /* Linux syscalls for x86 */
7 #if defined(ARCH_X86_H)
8 #ifndef __NR_ioprio_set
9 #define __NR_ioprio_set		289
10 #define __NR_ioprio_get		290
11 #endif
12 
13 #ifndef __NR_fadvise64
14 #define __NR_fadvise64		250
15 #endif
16 
17 #ifndef __NR_sys_splice
18 #define __NR_sys_splice		313
19 #define __NR_sys_tee		315
20 #define __NR_sys_vmsplice	316
21 #endif
22 
23 #ifndef __NR_preadv2
24 #define __NR_preadv2		378
25 #endif
26 #ifndef __NR_pwritev2
27 #define __NR_pwritev2		379
28 #endif
29 
30 /* Linux syscalls for x86_64 */
31 #elif defined(ARCH_X86_64_H)
32 #ifndef __NR_ioprio_set
33 #define __NR_ioprio_set		251
34 #define __NR_ioprio_get		252
35 #endif
36 
37 #ifndef __NR_fadvise64
38 #define __NR_fadvise64		221
39 #endif
40 
41 #ifndef __NR_sys_splice
42 #define __NR_sys_splice		275
43 #define __NR_sys_tee		276
44 #define __NR_sys_vmsplice	278
45 #endif
46 
47 #ifndef __NR_shmget
48 #define __NR_shmget		 29
49 #define __NR_shmat		 30
50 #define __NR_shmctl		 31
51 #define __NR_shmdt		 67
52 #endif
53 
54 #ifndef __NR_preadv2
55 #define __NR_preadv2		327
56 #endif
57 #ifndef __NR_pwritev2
58 #define __NR_pwritev2		328
59 #endif
60 
61 /* Linux syscalls for ppc */
62 #elif defined(ARCH_PPC_H)
63 #ifndef __NR_ioprio_set
64 #define __NR_ioprio_set		273
65 #define __NR_ioprio_get		274
66 #endif
67 
68 #ifndef __NR_fadvise64
69 #define __NR_fadvise64		233
70 #endif
71 
72 #ifndef __NR_sys_splice
73 #define __NR_sys_splice		283
74 #define __NR_sys_tee		284
75 #define __NR_sys_vmsplice	285
76 #endif
77 
78 /* Linux syscalls for ia64 */
79 #elif defined(ARCH_IA64_H)
80 #ifndef __NR_ioprio_set
81 #define __NR_ioprio_set		1274
82 #define __NR_ioprio_get		1275
83 #endif
84 
85 #ifndef __NR_fadvise64
86 #define __NR_fadvise64		1234
87 #endif
88 
89 #ifndef __NR_sys_splice
90 #define __NR_sys_splice		1297
91 #define __NR_sys_tee		1301
92 #define __NR_sys_vmsplice	1302
93 #endif
94 
95 #ifndef __NR_preadv2
96 #define __NR_preadv2		1348
97 #endif
98 #ifndef __NR_pwritev2
99 #define __NR_pwritev2		1349
100 #endif
101 
102 /* Linux syscalls for alpha */
103 #elif defined(ARCH_ALPHA_H)
104 #ifndef __NR_ioprio_set
105 #define __NR_ioprio_set		442
106 #define __NR_ioprio_get		443
107 #endif
108 
109 #ifndef __NR_fadvise64
110 #define __NR_fadvise64		413
111 #endif
112 
113 #ifndef __NR_sys_splice
114 #define __NR_sys_splice		468
115 #define __NR_sys_tee		470
116 #define __NR_sys_vmsplice	471
117 #endif
118 
119 /* Linux syscalls for s390 */
120 #elif defined(ARCH_S390_H)
121 #ifndef __NR_ioprio_set
122 #define __NR_ioprio_set		282
123 #define __NR_ioprio_get		283
124 #endif
125 
126 #ifndef __NR_fadvise64
127 #define __NR_fadvise64		253
128 #endif
129 
130 #ifndef __NR_sys_splice
131 #define __NR_sys_splice		306
132 #define __NR_sys_tee		308
133 #define __NR_sys_vmsplice	309
134 #endif
135 
136 #ifndef __NR_preadv2
137 #define __NR_preadv2		376
138 #endif
139 #ifndef __NR_pwritev2
140 #define __NR_pwritev2		377
141 #endif
142 
143 /* Linux syscalls for sparc */
144 #elif defined(ARCH_SPARC_H)
145 #ifndef __NR_ioprio_set
146 #define __NR_ioprio_set		196
147 #define __NR_ioprio_get		218
148 #endif
149 
150 #ifndef __NR_fadvise64
151 #define __NR_fadvise64		209
152 #endif
153 
154 #ifndef __NR_sys_splice
155 #define __NR_sys_splice		232
156 #define __NR_sys_tee		280
157 #define __NR_sys_vmsplice	25
158 #endif
159 
160 #ifndef __NR_preadv2
161 #define __NR_preadv2		358
162 #endif
163 #ifndef __NR_pwritev2
164 #define __NR_pwritev2		359
165 #endif
166 
167 /* Linux syscalls for sparc64 */
168 #elif defined(ARCH_SPARC64_H)
169 #ifndef __NR_ioprio_set
170 #define __NR_ioprio_set		196
171 #define __NR_ioprio_get		218
172 #endif
173 
174 #ifndef __NR_fadvise64
175 #define __NR_fadvise64		209
176 #endif
177 
178 #ifndef __NR_sys_splice
179 #define __NR_sys_splice		232
180 #define __NR_sys_tee		280
181 #define __NR_sys_vmsplice	25
182 #endif
183 
184 #ifndef __NR_preadv2
185 #define __NR_preadv2		358
186 #endif
187 #ifndef __NR_pwritev2
188 #define __NR_pwritev2		359
189 #endif
190 
191 /* Linux syscalls for arm */
192 #elif defined(ARCH_ARM_H)
193 #ifndef __NR_ioprio_set
194 #define __NR_ioprio_set		314
195 #define __NR_ioprio_get		315
196 #endif
197 
198 #ifndef __NR_fadvise64
199 #define __NR_fadvise64		270
200 #endif
201 
202 #ifndef __NR_sys_splice
203 #define __NR_sys_splice		340
204 #define __NR_sys_tee		342
205 #define __NR_sys_vmsplice	343
206 #endif
207 
208 #ifndef __NR_preadv2
209 #define __NR_preadv2		392
210 #endif
211 #ifndef __NR_pwritev2
212 #define __NR_pwritev2		393
213 #endif
214 
215 /* Linux syscalls for mips */
216 #elif defined(ARCH_MIPS64_H)
217 #ifndef __NR_ioprio_set
218 #define __NR_ioprio_set		314
219 #define __NR_ioprio_get		315
220 #endif
221 
222 #ifndef __NR_fadvise64
223 #define __NR_fadvise64		215
224 #endif
225 
226 #ifndef __NR_sys_splice
227 #define __NR_sys_splice		263
228 #define __NR_sys_tee		265
229 #define __NR_sys_vmsplice	266
230 #endif
231 
232 /* Linux syscalls for sh */
233 #elif defined(ARCH_SH_H)
234 #ifndef __NR_ioprio_set
235 #define __NR_ioprio_set		288
236 #define __NR_ioprio_get		289
237 #endif
238 
239 #ifndef __NR_fadvise64
240 #define __NR_fadvise64		250
241 #endif
242 
243 #ifndef __NR_sys_splice
244 #define __NR_sys_splice		313
245 #define __NR_sys_tee		315
246 #define __NR_sys_vmsplice	316
247 #endif
248 
249 /* Linux syscalls for hppa */
250 #elif defined(ARCH_HPPA_H)
251 #ifndef __NR_ioprio_set
252 #define __NR_ioprio_set		267
253 #define __NR_ioprio_get		268
254 #endif
255 
256 #ifndef __NR_fadvise64
257 #define __NR_fadvise64		236
258 #endif
259 
260 #ifndef __NR_sys_splice
261 #define __NR_sys_splice		291
262 #define __NR_sys_tee		293
263 #define __NR_sys_vmsplice	294
264 #endif
265 
266 /* Linux syscalls for aarch64 */
267 #elif defined(ARCH_AARCH64_H)
268 #ifndef __NR_ioprio_set
269 #define __NR_ioprio_set		30
270 #define __NR_ioprio_get		31
271 #endif
272 
273 #else
274 #warning "Unknown architecture"
275 #endif
276 
277 #endif /* FIO_OS_LINUX_SYSCALL_H */
278