diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-09-03 18:57:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:23 -0400 |
commit | e32dacb9f481fd6decb41adb28e720c923d34f54 (patch) | |
tree | 77594001f5c670380897d84367442725740383d9 /arch/um/kernel/syscall.c | |
parent | 08964c565b2fe49e338ffbe4907adcc19647ef16 (diff) |
[PATCH] uml: system call path cleanup
This merges two sets of files which had no business being split apart in the
first place.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/syscall.c')
-rw-r--r-- | arch/um/kernel/syscall.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c new file mode 100644 index 000000000000..1429c131879d --- /dev/null +++ b/arch/um/kernel/syscall.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "kern_util.h" | ||
7 | #include "syscall.h" | ||
8 | #include "os.h" | ||
9 | |||
10 | struct { | ||
11 | int syscall; | ||
12 | int pid; | ||
13 | long result; | ||
14 | unsigned long long start; | ||
15 | unsigned long long end; | ||
16 | } syscall_record[1024]; | ||
17 | |||
18 | int record_syscall_start(int syscall) | ||
19 | { | ||
20 | int max, index; | ||
21 | |||
22 | max = sizeof(syscall_record)/sizeof(syscall_record[0]); | ||
23 | index = next_syscall_index(max); | ||
24 | |||
25 | syscall_record[index].syscall = syscall; | ||
26 | syscall_record[index].pid = current_pid(); | ||
27 | syscall_record[index].result = 0xdeadbeef; | ||
28 | syscall_record[index].start = os_usecs(); | ||
29 | return(index); | ||
30 | } | ||
31 | |||
32 | void record_syscall_end(int index, long result) | ||
33 | { | ||
34 | syscall_record[index].result = result; | ||
35 | syscall_record[index].end = os_usecs(); | ||
36 | } | ||