diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-09-08 22:43:14 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-09-08 22:43:14 -0400 |
commit | 208eb584efbf995e0c5d92f76d5f4c08ae0054b4 (patch) | |
tree | 1d2613b937b371ca2fb3a1d550758ac298a4ebb7 /include/sys/syscall.h | |
parent | fe0260400eebb613338a720c9568c10ab4f17225 (diff) | |
download | musl-208eb584efbf995e0c5d92f76d5f4c08ae0054b4.tar.gz musl-208eb584efbf995e0c5d92f76d5f4c08ae0054b4.tar.xz musl-208eb584efbf995e0c5d92f76d5f4c08ae0054b4.zip |
syscall organization overhaul
now public syscall.h only exposes __NR_* and SYS_* constants and the variadic syscall function. no macros or inline functions, no __syscall_ret or other internal details, no 16-/32-bit legacy syscall renaming, etc. this logic has all been moved to src/internal/syscall.h with the arch-specific parts in arch/$(ARCH)/syscall_arch.h, and the amount of arch-specific stuff has been reduced to a minimum. changes still need to be reviewed/double-checked. minimal testing on i386 and mips has already been performed.
Diffstat (limited to 'include/sys/syscall.h')
-rw-r--r-- | include/sys/syscall.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 62564d7d..af3ca466 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -6,28 +6,10 @@ extern "C" { #include <features.h> -long __syscall_ret(unsigned long); -long __syscall(long, ...); long syscall(long, ...); #include <bits/syscall.h> -#define __syscall1(n,a) __syscall1(n,(long)(a)) -#define __syscall2(n,a,b) __syscall2(n,(long)(a),(long)(b)) -#define __syscall3(n,a,b,c) __syscall3(n,(long)(a),(long)(b),(long)(c)) -#define __syscall4(n,a,b,c,d) __syscall4(n,(long)(a),(long)(b),(long)(c),(long)(d)) -#define __syscall5(n,a,b,c,d,e) __syscall5(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e)) -#define __syscall6(n,a,b,c,d,e,f) __syscall6(n,(long)(a),(long)(b),(long)(c),(long)(d),(long)(e),(long)(f)) - -#define __SYSCALL_NARGS_X(a,b,c,d,e,f,g,n,...) n -#define __SYSCALL_NARGS(...) __SYSCALL_NARGS_X(__VA_ARGS__,6,5,4,3,2,1,0) -#define __SYSCALL_CONCAT_X(a,b) a##b -#define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X(a,b) -#define __SYSCALL_DISP(b,...) __SYSCALL_CONCAT(b,__SYSCALL_NARGS(__VA_ARGS__))(__VA_ARGS__) - -#define __syscall(...) __SYSCALL_DISP(__syscall,__VA_ARGS__) -#define syscall(...) __syscall_ret(__syscall(__VA_ARGS__)) - #ifdef __cplusplus } #endif |