[PATCH] Driver Core: pm diagnostics update, check for errors
[linux-2.6/verdex.git] / arch / um / kernel / skas / syscall_kern.c
blobbdf040ce5b8ed3bf2097e13ba1f5a8b4feff1c02
1 /*
2 * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
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"
15 extern syscall_handler_t *sys_call_table[];
17 long execute_syscall_skas(void *r)
19 struct pt_regs *regs = r;
20 long res;
21 int syscall;
23 current->thread.nsyscalls++;
24 nsyscalls++;
25 syscall = UPT_SYSCALL_NR(&regs->regs);
27 if((syscall >= NR_syscalls) || (syscall < 0))
28 res = -ENOSYS;
29 else res = EXECUTE_SYSCALL(syscall, regs);
31 return(res);
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: