]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/um/kernel/skas/syscall_kern.c
Linux-2.6.12-rc2
[mirror_ubuntu-artful-kernel.git] / arch / um / kernel / skas / syscall_kern.c
1 /*
2 * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6 #include "linux/sys.h"
7 #include "linux/ptrace.h"
8 #include "asm/errno.h"
9 #include "asm/unistd.h"
10 #include "asm/ptrace.h"
11 #include "asm/current.h"
12 #include "sysdep/syscalls.h"
13 #include "kern_util.h"
14
15 extern syscall_handler_t *sys_call_table[];
16
17 long execute_syscall_skas(void *r)
18 {
19 struct pt_regs *regs = r;
20 long res;
21 int syscall;
22
23 current->thread.nsyscalls++;
24 nsyscalls++;
25 syscall = UPT_SYSCALL_NR(&regs->regs);
26
27 if((syscall >= NR_syscalls) || (syscall < 0))
28 res = -ENOSYS;
29 else res = EXECUTE_SYSCALL(syscall, regs);
30
31 return(res);
32 }
33
34 /*
35 * Overrides for Emacs so that we follow Linus's tabbing style.
36 * Emacs will notice this stuff at the end of the file and automatically
37 * adjust the settings for this buffer only. This must remain at the end
38 * of the file.
39 * ---------------------------------------------------------------------------
40 * Local variables:
41 * c-file-style: "linux"
42 * End:
43 */