Merge with /home/shaggy/git/linus-clean/
[linux-2.6] / arch / um / kernel / skas / syscall_user.c
1 /* 
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #include <stdlib.h>
7 #include <signal.h>
8 #include "kern_util.h"
9 #include "uml-config.h"
10 #include "syscall_user.h"
11 #include "sysdep/ptrace.h"
12 #include "sysdep/sigcontext.h"
13 #include "skas.h"
14
15 void handle_syscall(union uml_pt_regs *regs)
16 {
17         long result;
18 #ifdef UML_CONFIG_SYSCALL_DEBUG
19         int index;
20
21         index = record_syscall_start(UPT_SYSCALL_NR(regs));
22 #endif
23
24         syscall_trace(regs, 0);
25         result = execute_syscall_skas(regs);
26
27         REGS_SET_SYSCALL_RETURN(regs->skas.regs, result);
28
29         syscall_trace(regs, 1);
30 #ifdef UML_CONFIG_SYSCALL_DEBUG
31         record_syscall_end(index, result);
32 #endif
33 }
34
35 /*
36  * Overrides for Emacs so that we follow Linus's tabbing style.
37  * Emacs will notice this stuff at the end of the file and automatically
38  * adjust the settings for this buffer only.  This must remain at the end
39  * of the file.
40  * ---------------------------------------------------------------------------
41  * Local variables:
42  * c-file-style: "linux"
43  * End:
44  */