vserver 1.9.5.x5
[linux-2.6.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         current->thread.nsyscalls++;
26         nsyscalls++;
27         syscall = UPT_SYSCALL_NR(&regs->regs);
28
29         if((syscall >= NR_syscalls) || (syscall < 0))
30                 res = -ENOSYS;
31         else res = EXECUTE_SYSCALL(syscall, regs);
32
33         return(res);
34 }
35
36 /*
37  * Overrides for Emacs so that we follow Linus's tabbing style.
38  * Emacs will notice this stuff at the end of the file and automatically
39  * adjust the settings for this buffer only.  This must remain at the end
40  * of the file.
41  * ---------------------------------------------------------------------------
42  * Local variables:
43  * c-file-style: "linux"
44  * End:
45  */