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