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__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret
) : "a"(n
) : "memory");
13 static inline long __syscall1(long n
, long a1
)
16 __asm__
__volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__ret
) : "a"(n
), "d"(a1
) : "memory");
20 static inline long __syscall2(long n
, long a1
, long a2
)
23 __asm__
__volatile__ (".hidden __vsyscall ; 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__ (".hidden __vsyscall ; 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__ (".hidden __vsyscall ; 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 ; .hidden __vsyscall ; 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 ; .hidden __vsyscall6 ; call __vsyscall6 ; add $4,%%esp" : "=a"(__ret
) : "a"(n
), "d"(a1
), "c"(a2
), "D"(a3
), "S"(a4
), "g"(0+(long[]){a5
, a6
}) : "memory");
56 #define VDSO_CGT_SYM "__vdso_clock_gettime"
57 #define VDSO_CGT_VER "LINUX_2.6"
59 #define SYSCALL_USE_SOCKETCALL