OLD | NEW |
1 #define __SYSCALL_LL_E(x) \ | 1 #define __SYSCALL_LL_E(x) \ |
2 ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \ | 2 ((union { \ |
3 ((union { long long ll; long l[2]; }){ .ll = x }).l[1] | 3 long long ll; \ |
| 4 long l[2]; \ |
| 5 }){.ll = x}) \ |
| 6 .l[0], \ |
| 7 ((union { \ |
| 8 long long ll; \ |
| 9 long l[2]; \ |
| 10 }){.ll = x}) \ |
| 11 .l[1] |
4 #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x)) | 12 #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x)) |
5 | 13 |
6 static inline long __syscall0(long n) | 14 static inline long __syscall0(long n) { |
7 { | 15 unsigned long __ret; |
8 » unsigned long __ret; | 16 __asm__ __volatile__(".hidden __vsyscall ; call __vsyscall" |
9 » __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re
t) : "a"(n) : "memory"); | 17 : "=a"(__ret) |
10 » return __ret; | 18 : "a"(n) |
| 19 : "memory"); |
| 20 return __ret; |
11 } | 21 } |
12 | 22 |
13 static inline long __syscall1(long n, long a1) | 23 static inline long __syscall1(long n, long a1) { |
14 { | 24 unsigned long __ret; |
15 » unsigned long __ret; | 25 __asm__ __volatile__(".hidden __vsyscall ; call __vsyscall" |
16 » __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re
t) : "a"(n), "d"(a1) : "memory"); | 26 : "=a"(__ret) |
17 » return __ret; | 27 : "a"(n), "d"(a1) |
| 28 : "memory"); |
| 29 return __ret; |
18 } | 30 } |
19 | 31 |
20 static inline long __syscall2(long n, long a1, long a2) | 32 static inline long __syscall2(long n, long a1, long a2) { |
21 { | 33 unsigned long __ret; |
22 » unsigned long __ret; | 34 __asm__ __volatile__(".hidden __vsyscall ; call __vsyscall" |
23 » __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re
t) : "a"(n), "d"(a1), "c"(a2) : "memory"); | 35 : "=a"(__ret) |
24 » return __ret; | 36 : "a"(n), "d"(a1), "c"(a2) |
| 37 : "memory"); |
| 38 return __ret; |
25 } | 39 } |
26 | 40 |
27 static inline long __syscall3(long n, long a1, long a2, long a3) | 41 static inline long __syscall3(long n, long a1, long a2, long a3) { |
28 { | 42 unsigned long __ret; |
29 » unsigned long __ret; | 43 __asm__ __volatile__(".hidden __vsyscall ; call __vsyscall" |
30 » __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re
t) : "a"(n), "d"(a1), "c"(a2), "D"(a3) : "memory"); | 44 : "=a"(__ret) |
31 » return __ret; | 45 : "a"(n), "d"(a1), "c"(a2), "D"(a3) |
| 46 : "memory"); |
| 47 return __ret; |
32 } | 48 } |
33 | 49 |
34 static inline long __syscall4(long n, long a1, long a2, long a3, long a4) | 50 static inline long __syscall4(long n, long a1, long a2, long a3, long a4) { |
35 { | 51 unsigned long __ret; |
36 » unsigned long __ret; | 52 __asm__ __volatile__(".hidden __vsyscall ; call __vsyscall" |
37 » __asm__ __volatile__ (".hidden __vsyscall ; call __vsyscall" : "=a"(__re
t) : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) : "memory"); | 53 : "=a"(__ret) |
38 » return __ret; | 54 : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4) |
| 55 : "memory"); |
| 56 return __ret; |
39 } | 57 } |
40 | 58 |
41 static inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a
5) | 59 static inline long __syscall5(long n, |
42 { | 60 long a1, |
43 » unsigned long __ret; | 61 long a2, |
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"); | 62 long a3, |
45 » return __ret; | 63 long a4, |
| 64 long a5) { |
| 65 unsigned long __ret; |
| 66 __asm__ __volatile__( |
| 67 "push %6 ; .hidden __vsyscall ; call __vsyscall ; add $4,%%esp" |
| 68 : "=a"(__ret) |
| 69 : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(a5) |
| 70 : "memory"); |
| 71 return __ret; |
46 } | 72 } |
47 | 73 |
48 static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
5, long a6) | 74 static inline long |
49 { | 75 __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6) { |
50 » unsigned long __ret; | 76 unsigned long __ret; |
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"); | 77 __asm__ __volatile__( |
52 » return __ret; | 78 "push %6 ; .hidden __vsyscall6 ; call __vsyscall6 ; add $4,%%esp" |
| 79 : "=a"(__ret) |
| 80 : "a"(n), "d"(a1), "c"(a2), "D"(a3), "S"(a4), "g"(0 + (long[]){a5, a6}) |
| 81 : "memory"); |
| 82 return __ret; |
53 } | 83 } |
54 | 84 |
55 #define VDSO_USEFUL | 85 #define VDSO_USEFUL |
56 #define VDSO_CGT_SYM "__vdso_clock_gettime" | 86 #define VDSO_CGT_SYM "__vdso_clock_gettime" |
57 #define VDSO_CGT_VER "LINUX_2.6" | 87 #define VDSO_CGT_VER "LINUX_2.6" |
58 | 88 |
59 #define SYSCALL_USE_SOCKETCALL | 89 #define SYSCALL_USE_SOCKETCALL |
OLD | NEW |