diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-07-20 15:24:38 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-07-20 15:24:38 -0400 |
commit | 8cba39e53feec923826e43429a4682600b81fd6b (patch) | |
tree | 5651313b2c99c3e0477e94df30285f9111529bfd /libc/sysdeps/linux/cris | |
parent | 064bf679a0670056145b9317119c206fd403ddb4 (diff) |
syscall: convert cris/hppa to common syscalls
The cris/hppa code appears to be easy to convert, so go ahead and do it
for them. Build tested only.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/cris')
-rw-r--r-- | libc/sysdeps/linux/cris/bits/syscalls.h | 72 |
1 files changed, 4 insertions, 68 deletions
diff --git a/libc/sysdeps/linux/cris/bits/syscalls.h b/libc/sysdeps/linux/cris/bits/syscalls.h index 93e7cf2d9..9db08407c 100644 --- a/libc/sysdeps/linux/cris/bits/syscalls.h +++ b/libc/sysdeps/linux/cris/bits/syscalls.h @@ -7,83 +7,19 @@ #ifndef __ASSEMBLER__ -#include <errno.h> - -#define SYS_ify(syscall_name) (__NR_##syscall_name) - -#undef _syscall0 -#define _syscall0(type,name) \ -type name(void) \ -{ \ -return (type) (INLINE_SYSCALL(name, 0)); \ -} - -#undef _syscall1 -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ -return (type) (INLINE_SYSCALL(name, 1, arg1)); \ -} - -#undef _syscall2 -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) \ -{ \ -return (type) (INLINE_SYSCALL(name, 2, arg1, arg2)); \ -} - -#undef _syscall3 -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) \ -{ \ -return (type) (INLINE_SYSCALL(name, 3, arg1, arg2, arg3)); \ -} - -#undef _syscall4 -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ -return (type) (INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4)); \ -} - -#undef _syscall5 -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ -return (type) (INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5)); \ -} - -#undef _syscall6 -#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ -{ \ -return (type) (INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6)); \ -} - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ({ \ - unsigned long __sys_res; \ register unsigned long __res __asm__ ("r10"); \ - LOAD_ARGS_c_##nr (args) \ + LOAD_ARGS_c_##nr(args) \ register unsigned long __callno __asm__ ("r9") \ - = SYS_ify (name); \ + = name; \ __asm__ __volatile__ (LOAD_ARGS_asm_##nr (args) \ CHECK_ARGS_asm_##nr \ "break 13" \ : "=r" (__res) \ : ASM_ARGS_##nr (args) \ : ASM_CLOBBER_##nr); \ - __sys_res = __res; \ - \ - if (__sys_res >= (unsigned long) -4096) \ - { \ - __set_errno (- __sys_res); \ - __sys_res = (unsigned long) -1; \ - } \ - __sys_res; \ + __res; \ }) #define LOAD_ARGS_c_0() |