debuggers.hg

view tools/libaio/src/syscall-i386.h @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 2937703f0ed0
children
line source
1 #define __NR_io_setup 245
2 #define __NR_io_destroy 246
3 #define __NR_io_getevents 247
4 #define __NR_io_submit 248
5 #define __NR_io_cancel 249
7 #define io_syscall1(type,fname,sname,type1,arg1) \
8 type fname(type1 arg1) \
9 { \
10 long __res; \
11 __asm__ volatile ("xchgl %%edi,%%ebx\n" \
12 "int $0x80\n" \
13 "xchgl %%edi,%%ebx" \
14 : "=a" (__res) \
15 : "0" (__NR_##sname),"D" ((long)(arg1))); \
16 return __res; \
17 }
19 #define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
20 type fname(type1 arg1,type2 arg2) \
21 { \
22 long __res; \
23 __asm__ volatile ("xchgl %%edi,%%ebx\n" \
24 "int $0x80\n" \
25 "xchgl %%edi,%%ebx" \
26 : "=a" (__res) \
27 : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2))); \
28 return __res; \
29 }
31 #define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
32 type fname(type1 arg1,type2 arg2,type3 arg3) \
33 { \
34 long __res; \
35 __asm__ volatile ("xchgl %%edi,%%ebx\n" \
36 "int $0x80\n" \
37 "xchgl %%edi,%%ebx" \
38 : "=a" (__res) \
39 : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2)), \
40 "d" ((long)(arg3))); \
41 return __res; \
42 }
44 #define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
45 type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
46 { \
47 long __res; \
48 __asm__ volatile ("xchgl %%edi,%%ebx\n" \
49 "int $0x80\n" \
50 "xchgl %%edi,%%ebx" \
51 : "=a" (__res) \
52 : "0" (__NR_##sname),"D" ((long)(arg1)),"c" ((long)(arg2)), \
53 "d" ((long)(arg3)),"S" ((long)(arg4))); \
54 return __res; \
55 }
57 #define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
58 type5,arg5) \
59 type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
60 { \
61 long __res; \
62 long tmp; \
63 __asm__ volatile ("movl %%ebx,%7\n" \
64 "movl %2,%%ebx\n" \
65 "int $0x80\n" \
66 "movl %7,%%ebx" \
67 : "=a" (__res) \
68 : "0" (__NR_##sname),"rm" ((long)(arg1)),"c" ((long)(arg2)), \
69 "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \
70 "m" (tmp)); \
71 return __res; \
72 }