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 static inline long __syscall0(long n)
9 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n) : "memory");
13 static inline long __syscall1(long n, long a1)
16 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1) : "memory");
20 static inline long __syscall2(long n, long a1, long a2)
23 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2) : "memory");
27 static inline long __syscall3(long n, long a1, long a2, long a3)
30 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3) : "memory");
34 static inline long __syscall4(long n, long a1, long a2, long a3, long a4)
37 __asm__ __volatile__ ("call __vsyscall" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) : "memory");
41 static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
44 __asm__ __volatile__ ("push %6 ; call __vsyscall ; add $4,%%esp" : "=a"(__ret) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(a5) : "memory");
48 static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
51 __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");
58 #define __SC_connect 3
61 #define __SC_getsockname 6
62 #define __SC_getpeername 7
63 #define __SC_socketpair 8
66 #define __SC_sendto 11
67 #define __SC_recvfrom 12
68 #define __SC_shutdown 13
69 #define __SC_setsockopt 14
70 #define __SC_getsockopt 15
71 #define __SC_sendmsg 16
72 #define __SC_recvmsg 17
73 #define __SC_accept4 18
74 #define __SC_recvmmsg 19
75 #define __SC_sendmmsg 20