summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/bits/syscalls.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-03 16:44:59 -0400
committerMike Frysinger <vapier@gentoo.org>2009-07-08 21:39:32 -0400
commitb387d762361e6c109c6a60bced003e72447b0a33 (patch)
tree990642d77fa3f84f1f0a76998ed51d3a07a0ad76 /libc/sysdeps/linux/powerpc/bits/syscalls.h
parentad539e7bc72abfcafeb5c4556a27058fb0d398a9 (diff)
syscall: unify common syscall defines
Unify all the common syscall defines in syscalls-common.h and scrub all the duplicated code from relevant ports. This should also make converting existing ports to INLINE_SYSCALL() much easier as they don't have to get lost in all the unrelated noise, as well as creating new ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/sysdeps/linux/powerpc/bits/syscalls.h')
-rw-r--r--libc/sysdeps/linux/powerpc/bits/syscalls.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h
index 96894d065..e11c362c8 100644
--- a/libc/sysdeps/linux/powerpc/bits/syscalls.h
+++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h
@@ -22,12 +22,6 @@
#ifndef _SYSCALL_H
# error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
#endif
-/* For Linux we can use the system call table in the header file
- /usr/include/asm/unistd.h
- of the kernel. But these symbols do not follow the SYS_* syntax
- so we have to redefine the `SYS_ify' macro here. */
-#undef SYS_ify
-#define SYS_ify(syscall_name) __NR_##syscall_name
#ifndef __ASSEMBLER__
@@ -136,7 +130,6 @@
(int) r3; \
})
-# undef INLINE_SYSCALL
# define INLINE_SYSCALL(name, nr, args...) \
({ \
INTERNAL_SYSCALL_DECL (sc_err); \
@@ -157,10 +150,8 @@
"sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal
an error return status). */
-# undef INTERNAL_SYSCALL_DECL
# define INTERNAL_SYSCALL_DECL(err) long int err
-# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
register long int r0 __asm__ ("r0"); \
@@ -189,11 +180,9 @@
# define INTERNAL_SYSCALL(name, err, nr, args...) \
INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
-# undef INTERNAL_SYSCALL_ERROR_P
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
((void) (val), __builtin_expect ((err) & (1 << 28), 0))
-# undef INTERNAL_SYSCALL_ERRNO
# define INTERNAL_SYSCALL_ERRNO(val, err) (val)
extern void __illegally_sized_syscall_arg1(void);
@@ -250,49 +239,6 @@ extern void __illegally_sized_syscall_arg6(void);
# define ASM_INPUT_5 ASM_INPUT_4, "5" (r7)
# define ASM_INPUT_6 ASM_INPUT_5, "6" (r8)
-
-#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); \
-}
-
#endif /* __ASSEMBLER__ */