Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / um / kernel / tt / syscall_kern.c
blob2650a628719e41136291fae37b44ff9d3c02cb48
1 /*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
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"
17 extern syscall_handler_t *sys_call_table[];
19 long execute_syscall_tt(void *r)
21 struct pt_regs *regs = r;
22 long res;
23 int syscall;
25 #ifdef CONFIG_SYSCALL_DEBUG
26 current->thread.nsyscalls++;
27 nsyscalls++;
28 #endif
29 syscall = UPT_SYSCALL_NR(&regs->regs);
31 if((syscall >= NR_syscalls) || (syscall < 0))
32 res = -ENOSYS;
33 else res = EXECUTE_SYSCALL(syscall, regs);
35 return(res);
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: