• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define __SYSCALL_LL_E(x) (x)
2 #define __SYSCALL_LL_O(x) (x)
3 
__syscall0(long n)4 static __inline long __syscall0(long n)
5 {
6 	unsigned long ret;
7 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n) : "rcx", "r11", "memory");
8 	return ret;
9 }
10 
__syscall1(long n,long a1)11 static __inline long __syscall1(long n, long a1)
12 {
13 	unsigned long ret;
14 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory");
15 	return ret;
16 }
17 
__syscall2(long n,long a1,long a2)18 static __inline long __syscall2(long n, long a1, long a2)
19 {
20 	unsigned long ret;
21 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2)
22 						  : "rcx", "r11", "memory");
23 	return ret;
24 }
25 
__syscall3(long n,long a1,long a2,long a3)26 static __inline long __syscall3(long n, long a1, long a2, long a3)
27 {
28 	unsigned long ret;
29 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
30 						  "d"(a3) : "rcx", "r11", "memory");
31 	return ret;
32 }
33 
__syscall4(long n,long a1,long a2,long a3,long a4)34 static __inline long __syscall4(long n, long a1, long a2, long a3, long a4)
35 {
36 	unsigned long ret;
37 	register long r10 __asm__("r10") = a4;
38 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
39 						  "d"(a3), "r"(r10): "rcx", "r11", "memory");
40 	return ret;
41 }
42 
__syscall5(long n,long a1,long a2,long a3,long a4,long a5)43 static __inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
44 {
45 	unsigned long ret;
46 	register long r10 __asm__("r10") = a4;
47 	register long r8 __asm__("r8") = a5;
48 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
49 						  "d"(a3), "r"(r10), "r"(r8) : "rcx", "r11", "memory");
50 	return ret;
51 }
52 
__syscall6(long n,long a1,long a2,long a3,long a4,long a5,long a6)53 static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
54 {
55 	unsigned long ret;
56 	register long r10 __asm__("r10") = a4;
57 	register long r8 __asm__("r8") = a5;
58 	register long r9 __asm__("r9") = a6;
59 	__asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1), "S"(a2),
60 						  "d"(a3), "r"(r10), "r"(r8), "r"(r9) : "rcx", "r11", "memory");
61 	return ret;
62 }
63 
64 #define VDSO_USEFUL
65 #define VDSO_CGT_SYM "__vdso_clock_gettime"
66 #define VDSO_CGT_VER "LINUX_2.6"
67 #define VDSO_GETCPU_SYM "__vdso_getcpu"
68 #define VDSO_GETCPU_VER "LINUX_2.6"
69 
70 #define IPC_64 0
71