protect destruction of process-shared mutexes against robust list races
[musl.git] / arch / aarch64 / syscall_arch.h
blob504983aa276a641a4be60ea12733c752b9b49ea1
1 #define __SYSCALL_LL_E(x) (x)
2 #define __SYSCALL_LL_O(x) (x)
4 #define __asm_syscall(...) do { \
5 __asm__ __volatile__ ( "svc 0" \
6 : "=r"(x0) : __VA_ARGS__ : "memory", "cc"); \
7 return x0; \
8 } while (0)
10 static inline long __syscall0(long n)
12 register long x8 __asm__("x8") = n;
13 register long x0 __asm__("x0");
14 __asm_syscall("r"(x8));
17 static inline long __syscall1(long n, long a)
19 register long x8 __asm__("x8") = n;
20 register long x0 __asm__("x0") = a;
21 __asm_syscall("r"(x8), "0"(x0));
24 static inline long __syscall2(long n, long a, long b)
26 register long x8 __asm__("x8") = n;
27 register long x0 __asm__("x0") = a;
28 register long x1 __asm__("x1") = b;
29 __asm_syscall("r"(x8), "0"(x0), "r"(x1));
32 static inline long __syscall3(long n, long a, long b, long c)
34 register long x8 __asm__("x8") = n;
35 register long x0 __asm__("x0") = a;
36 register long x1 __asm__("x1") = b;
37 register long x2 __asm__("x2") = c;
38 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2));
41 static inline long __syscall4(long n, long a, long b, long c, long d)
43 register long x8 __asm__("x8") = n;
44 register long x0 __asm__("x0") = a;
45 register long x1 __asm__("x1") = b;
46 register long x2 __asm__("x2") = c;
47 register long x3 __asm__("x3") = d;
48 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3));
51 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
53 register long x8 __asm__("x8") = n;
54 register long x0 __asm__("x0") = a;
55 register long x1 __asm__("x1") = b;
56 register long x2 __asm__("x2") = c;
57 register long x3 __asm__("x3") = d;
58 register long x4 __asm__("x4") = e;
59 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4));
62 static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
64 register long x8 __asm__("x8") = n;
65 register long x0 __asm__("x0") = a;
66 register long x1 __asm__("x1") = b;
67 register long x2 __asm__("x2") = c;
68 register long x3 __asm__("x3") = d;
69 register long x4 __asm__("x4") = e;
70 register long x5 __asm__("x5") = f;
71 __asm_syscall("r"(x8), "0"(x0), "r"(x1), "r"(x2), "r"(x3), "r"(x4), "r"(x5));
74 #define VDSO_USEFUL
75 #define VDSO_CGT_SYM "__kernel_clock_gettime"
76 #define VDSO_CGT_VER "LINUX_2.6.39"
78 #define IPC_64 0