1 #define __SYSCALL_LL_E(x) \
2 ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
3 ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
4 #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
6 #define __SYSCALL_SSLEN 8
8 static inline long __syscall0(long n)
11 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n) : "memory");
15 static inline long __syscall1(long n, long a1)
18 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1) : "memory");
22 static inline long __syscall2(long n, long a1, long a2)
25 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2) : "memory");
29 static inline long __syscall3(long n, long a1, long a2, long a3)
32 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3) : "memory");
36 static inline long __syscall4(long n, long a1, long a2, long a3, long a4)
39 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) : "memory");
43 static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
46 __asm__ __volatile__ ("push %6 ; call __vsyscall ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(a5) : "memory");
50 static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
53 __asm__ __volatile__ ("push %6 ; call __vsyscall6 ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(0+(long[]){a5, a6}) : "memory");
60 #define __SC_connect 3
63 #define __SC_getsockname 6
64 #define __SC_getpeername 7
65 #define __SC_socketpair 8
68 #define __SC_sendto 11
69 #define __SC_recvfrom 12
70 #define __SC_shutdown 13
71 #define __SC_setsockopt 14
72 #define __SC_getsockopt 15
73 #define __SC_sendmsg 16
74 #define __SC_recvmsg 17
75 #define __SC_accept4 18
76 #define __SC_recvmmsg 19
77 #define __SC_sendmmsg 20