initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / um / kernel / skas / syscall_user.c
blob34fd5f94e2f4a9f3a6bc574a75d00b3d3f21b802
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include <stdlib.h>
7 #include <signal.h>
8 #include "kern_util.h"
9 #include "syscall_user.h"
10 #include "sysdep/ptrace.h"
11 #include "sysdep/sigcontext.h"
13 /* XXX Bogus */
14 #define ERESTARTSYS 512
15 #define ERESTARTNOINTR 513
16 #define ERESTARTNOHAND 514
18 void handle_syscall(union uml_pt_regs *regs)
20 long result;
21 int index;
23 index = record_syscall_start(UPT_SYSCALL_NR(regs));
25 syscall_trace(regs, 1);
26 result = execute_syscall(regs);
28 REGS_SET_SYSCALL_RETURN(regs->skas.regs, result);
29 if((result == -ERESTARTNOHAND) || (result == -ERESTARTSYS) ||
30 (result == -ERESTARTNOINTR))
31 do_signal(result);
33 syscall_trace(regs, 0);
34 record_syscall_end(index, result);
38 * Overrides for Emacs so that we follow Linus's tabbing style.
39 * Emacs will notice this stuff at the end of the file and automatically
40 * adjust the settings for this buffer only. This must remain at the end
41 * of the file.
42 * ---------------------------------------------------------------------------
43 * Local variables:
44 * c-file-style: "linux"
45 * End: