diff options
author | Tobias Anderberg <tobias.anderberg@axis.com> | 2002-09-23 10:37:16 +0000 |
---|---|---|
committer | Tobias Anderberg <tobias.anderberg@axis.com> | 2002-09-23 10:37:16 +0000 |
commit | 3a5a812fd610a5bfacadac212c35bdf04c852e26 (patch) | |
tree | 4921f65daa3cda4fb2e5bd2578754cb763e69389 /ldso | |
parent | 22b7b8e27e85c2bf5a2fdabee36417e9cb61fc7b (diff) |
Removed redundant code. Same thing exist in sys/syscalls.h so include that
instead.
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/cris/dl-syscalls.h | 140 | ||||
-rw-r--r-- | ldso/ldso/cris/ld_syscalls.h | 140 |
2 files changed, 10 insertions, 270 deletions
diff --git a/ldso/ldso/cris/dl-syscalls.h b/ldso/ldso/cris/dl-syscalls.h index dae46bd01..651280c18 100644 --- a/ldso/ldso/cris/dl-syscalls.h +++ b/ldso/ldso/cris/dl-syscalls.h @@ -1,137 +1,7 @@ -/* - * This file contains the system call macros and syscall - * numbers used by the shared library loader. Taken from - * Linux/CRIS 2.4.17 version kernel. - */ - -#define __NR_exit 1 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_getpid 20 -#define __NR_getuid 24 -#define __NR_getgid 47 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_readlink 85 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_stat 106 -#define __NR_mprotect 125 - /* - * Here are the macros which define how this platform makes - * system calls. This particular variant does _not_ set - * errno since these will get called before the errno symbol - * is dynamicly linked. + * Define the __set_errno macro as nothing so that INLINE_SYSCALL + * won't set errno, which is important since we make system calls + * before the errno symbol is dynamicly linked. */ -#define _syscall0(type,name) \ -type name(void) \ -{ \ - register long __r10 __asm__ ("r10"); \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), "r" (__r12) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#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) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("move %6,$mof\n\t" \ - "movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13), "g" (arg5) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#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) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("move %6,$mof\n\tmove %7,$srp\n\t" \ - "movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13), "g" (arg5), "g" (arg6)\ - : "r9", "srp"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} +#define __set_errno(X) {(void)(X);} +#include "sys/syscall.h" diff --git a/ldso/ldso/cris/ld_syscalls.h b/ldso/ldso/cris/ld_syscalls.h index dae46bd01..651280c18 100644 --- a/ldso/ldso/cris/ld_syscalls.h +++ b/ldso/ldso/cris/ld_syscalls.h @@ -1,137 +1,7 @@ -/* - * This file contains the system call macros and syscall - * numbers used by the shared library loader. Taken from - * Linux/CRIS 2.4.17 version kernel. - */ - -#define __NR_exit 1 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_getpid 20 -#define __NR_getuid 24 -#define __NR_getgid 47 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_readlink 85 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_stat 106 -#define __NR_mprotect 125 - /* - * Here are the macros which define how this platform makes - * system calls. This particular variant does _not_ set - * errno since these will get called before the errno symbol - * is dynamicly linked. + * Define the __set_errno macro as nothing so that INLINE_SYSCALL + * won't set errno, which is important since we make system calls + * before the errno symbol is dynamicly linked. */ -#define _syscall0(type,name) \ -type name(void) \ -{ \ - register long __r10 __asm__ ("r10"); \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), "r" (__r12) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#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) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("move %6,$mof\n\t" \ - "movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13), "g" (arg5) \ - : "r9"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} - -#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) \ -{ \ - register long __r10 __asm__ ("r10") = (long) arg1; \ - register long __r11 __asm__ ("r11") = (long) arg2; \ - register long __r12 __asm__ ("r12") = (long) arg3; \ - register long __r13 __asm__ ("r13") = (long) arg4; \ - __asm__ __volatile__ ("move %6,$mof\n\tmove %7,$srp\n\t" \ - "movu.w %1,$r9\n\tbreak 13" \ - : "=r" (__r10) \ - : "g" (__NR_##name), "0" (__r10), "r" (__r11), \ - "r" (__r12), "r" (__r13), "g" (arg5), "g" (arg6)\ - : "r9", "srp"); \ - if(__r10 >= 0) \ - return (type) __r10; \ - return (type) -1; \ -} +#define __set_errno(X) {(void)(X);} +#include "sys/syscall.h" |