4 extern void syscall_interrupt(void);
6 #define _syscall0(type,name) \
10 __asm__ volatile ("int $0x80" \
12 : "0" (__NR_##name)); \
14 return (type) __res; \
18 #define _syscall1(type,name,atype,a) \
22 __asm__ volatile ("int $0x80" \
24 : "0" (__NR_##name),"b" ((long)(a))); \
26 return (type) __res; \
30 #define _syscall2(type,name,atype,a,btype,b) \
31 type name(atype a,btype b) \
34 __asm__ volatile ("int $0x80" \
36 : "0" (__NR_##name),"b" ((long)(a)),"c" ((long)(b))); \
38 return (type) __res; \
42 #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
43 type name(atype a,btype b,ctype c) \
46 __asm__ volatile ("int $0x80" \
48 : "a" (__NR_##name),"b" ((long)(a)),"c" ((long)(b)),"d" ((long)(c))); \
50 return (type) __res; \
54 #endif /* syscall.h */