ppc signal/NSIG related fix (warning fix, redefinition)
[musl] / arch / powerpc / syscall_arch.h
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) 0, __SYSCALL_LL_E((x))
5
6 #define __SYSCALL_SSLEN 8
7
8 long (__syscall)(long, ...);
9
10 static inline long __syscall0(long n)
11 {
12         return (__syscall)(n, 0, 0, 0, 0, 0, 0);
13 }
14
15 static inline long __syscall1(long n, long a)
16 {
17         return (__syscall)(n, a, 0, 0, 0, 0, 0);
18 }
19
20 static inline long __syscall2(long n, long a, long b)
21 {
22         return (__syscall)(n, a, b, 0, 0, 0, 0);
23 }
24
25 static inline long __syscall3(long n, long a, long b, long c)
26 {
27         return (__syscall)(n, a, b, c, 0, 0, 0);
28 }
29
30 static inline long __syscall4(long n, long a, long b, long c, long d)
31 {
32         return (__syscall)(n, a, b, c, d, 0, 0);
33 }
34
35 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
36 {
37         return (__syscall)(n, a, b, c, d, e, 0);
38 }
39
40 static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
41 {
42         return (__syscall)(n, a, b, c, d, e, f);
43 }
44
45 #define __SC_socket      1
46 #define __SC_bind        2
47 #define __SC_connect     3
48 #define __SC_listen      4
49 #define __SC_accept      5
50 #define __SC_getsockname 6
51 #define __SC_getpeername 7
52 #define __SC_socketpair  8
53 #define __SC_send        9
54 #define __SC_recv        10
55 #define __SC_sendto      11
56 #define __SC_recvfrom    12
57 #define __SC_shutdown    13
58 #define __SC_setsockopt  14
59 #define __SC_getsockopt  15
60 #define __SC_sendmsg     16
61 #define __SC_recvmsg     17