diff options
author | Tobias Anderberg <tobias.anderberg@axis.com> | 2002-09-20 15:17:16 +0000 |
---|---|---|
committer | Tobias Anderberg <tobias.anderberg@axis.com> | 2002-09-20 15:17:16 +0000 |
commit | cb9136d9843e3756ebc79f91a3a522ed4ca73eda (patch) | |
tree | 32c4645d05a7b4d7ec5b56abeb6f837c574e3af8 /libc/sysdeps/linux/cris/syscall-cris.c | |
parent | 750c0194b0b645120ddccf25b82848b06be6cdc2 (diff) |
* Added clone() system call.
* Proper implementation of bits/syscalls.h, no cheating by just including
<asm/unistd.h>.
* Proper implementation of syscall.S, it no longer contains the
__syscall_error, instead it contains code which makes syscall(nr,...) a
system call.
* Added sysdep.S which contains the code for __syscall_error.
* Added some macros to sysdep.h.
* Added sys/procfs.h, which is needed when compiling with thread support.
* Removed unused syscall-cris.c.
Diffstat (limited to 'libc/sysdeps/linux/cris/syscall-cris.c')
-rw-r--r-- | libc/sysdeps/linux/cris/syscall-cris.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libc/sysdeps/linux/cris/syscall-cris.c b/libc/sysdeps/linux/cris/syscall-cris.c deleted file mode 100644 index fa923ec9d..000000000 --- a/libc/sysdeps/linux/cris/syscall-cris.c +++ /dev/null @@ -1,41 +0,0 @@ -/* syscall.c - generalized linux system call interface */ - -#include <stdarg.h> -#include <syscall.h> -#include <errno.h> - -/* perform a Linux/CRIS system call with variable number of arguments - * put them and the syscall number in the right registers and call - * break 13. - */ - -int -syscall(int number, ...) -{ - register long __a __asm__ ("r10"); - register long __b __asm__ ("r11"); - register long __c __asm__ ("r12"); - register long __d __asm__ ("r13"); - register long __e __asm__ ("r0"); - va_list args; - - va_start(args, number); - __a = va_arg(args, int); - __b = va_arg(args, int); - __c = va_arg(args, int); - __d = va_arg(args, int); - __e = va_arg(args, int); - va_end(args); - - __asm__ volatile ("movu.w %1,$r9\n\tbreak 13\n\t" - : "=r" (__a) - : "g" (number), "0" (__a), "r" (__b), "r" (__c), "r" (__d), - "r" (__e) - : "r10", "r9"); - - if (__a >= 0) - return __a; - - errno = -__a; - return -1; -} |