aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/unistd.h')
-rw-r--r--include/asm-i386/unistd.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index dc81a55dd94d..014e3562895b 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -316,8 +316,10 @@
316#define __NR_pselect6 308 316#define __NR_pselect6 308
317#define __NR_ppoll 309 317#define __NR_ppoll 309
318#define __NR_unshare 310 318#define __NR_unshare 310
319#define __NR_set_robust_list 311
320#define __NR_get_robust_list 312
319 321
320#define NR_syscalls 311 322#define NR_syscalls 313
321 323
322/* 324/*
323 * user-visible error numbers are in the range -1 - -128: see 325 * user-visible error numbers are in the range -1 - -128: see
@@ -347,9 +349,9 @@ __syscall_return(type,__res); \
347type name(type1 arg1) \ 349type name(type1 arg1) \
348{ \ 350{ \
349long __res; \ 351long __res; \
350__asm__ volatile ("int $0x80" \ 352__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
351 : "=a" (__res) \ 353 : "=a" (__res) \
352 : "0" (__NR_##name),"b" ((long)(arg1)) : "memory"); \ 354 : "0" (__NR_##name),"ri" ((long)(arg1)) : "memory"); \
353__syscall_return(type,__res); \ 355__syscall_return(type,__res); \
354} 356}
355 357
@@ -357,9 +359,10 @@ __syscall_return(type,__res); \
357type name(type1 arg1,type2 arg2) \ 359type name(type1 arg1,type2 arg2) \
358{ \ 360{ \
359long __res; \ 361long __res; \
360__asm__ volatile ("int $0x80" \ 362__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
361 : "=a" (__res) \ 363 : "=a" (__res) \
362 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)) : "memory"); \ 364 : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
365 : "memory"); \
363__syscall_return(type,__res); \ 366__syscall_return(type,__res); \
364} 367}
365 368
@@ -367,9 +370,9 @@ __syscall_return(type,__res); \
367type name(type1 arg1,type2 arg2,type3 arg3) \ 370type name(type1 arg1,type2 arg2,type3 arg3) \
368{ \ 371{ \
369long __res; \ 372long __res; \
370__asm__ volatile ("int $0x80" \ 373__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
371 : "=a" (__res) \ 374 : "=a" (__res) \
372 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ 375 : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
373 "d" ((long)(arg3)) : "memory"); \ 376 "d" ((long)(arg3)) : "memory"); \
374__syscall_return(type,__res); \ 377__syscall_return(type,__res); \
375} 378}
@@ -378,9 +381,9 @@ __syscall_return(type,__res); \
378type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ 381type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
379{ \ 382{ \
380long __res; \ 383long __res; \
381__asm__ volatile ("int $0x80" \ 384__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
382 : "=a" (__res) \ 385 : "=a" (__res) \
383 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ 386 : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
384 "d" ((long)(arg3)),"S" ((long)(arg4)) : "memory"); \ 387 "d" ((long)(arg3)),"S" ((long)(arg4)) : "memory"); \
385__syscall_return(type,__res); \ 388__syscall_return(type,__res); \
386} 389}
@@ -390,10 +393,12 @@ __syscall_return(type,__res); \
390type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ 393type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
391{ \ 394{ \
392long __res; \ 395long __res; \
393__asm__ volatile ("int $0x80" \ 396__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; movl %1,%%eax ; " \
397 "int $0x80 ; pop %%ebx" \
394 : "=a" (__res) \ 398 : "=a" (__res) \
395 : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ 399 : "i" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
396 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) : "memory"); \ 400 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) \
401 : "memory"); \
397__syscall_return(type,__res); \ 402__syscall_return(type,__res); \
398} 403}
399 404
@@ -402,11 +407,14 @@ __syscall_return(type,__res); \
402type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ 407type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
403{ \ 408{ \
404long __res; \ 409long __res; \
405__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; pop %%ebp" \ 410 struct { long __a1; long __a6; } __s = { (long)arg1, (long)arg6 }; \
411__asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \
412 "movl 0(%2),%%ebx ; movl %1,%%eax ; int $0x80 ; " \
413 "pop %%ebx ; pop %%ebp" \
406 : "=a" (__res) \ 414 : "=a" (__res) \
407 : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ 415 : "i" (__NR_##name),"0" ((long)(&__s)),"c" ((long)(arg2)), \
408 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ 416 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) \
409 "0" ((long)(arg6)) : "memory"); \ 417 : "memory"); \
410__syscall_return(type,__res); \ 418__syscall_return(type,__res); \
411} 419}
412 420