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