diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-09-06 15:47:31 -0700 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-09-06 15:47:31 -0700 |
| commit | c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3 (patch) | |
| tree | 5fbec9030029da1ec387c18b85f26f19ee50da44 /arch/um/kernel/syscall.c | |
| parent | bfa0d75a1eee59f0577e3c1697ff570b77581a35 (diff) | |
| parent | 4706df3d3c42af802597d82c8b1542c3d52eab23 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#include "kern_util.h" +#include "syscall.h" +#include "os.h" + +struct { + int syscall; + int pid; + long result; + unsigned long long start; + unsigned long long end; +} syscall_record[1024]; + +int record_syscall_start(int syscall) +{ + int max, index; + + max = sizeof(syscall_record)/sizeof(syscall_record[0]); + index = next_syscall_index(max); + + syscall_record[index].syscall = syscall; + syscall_record[index].pid = current_pid(); + syscall_record[index].result = 0xdeadbeef; + syscall_record[index].start = os_usecs(); + return(index); +} + +void record_syscall_end(int index, long result) +{ + syscall_record[index].result = result; + syscall_record[index].end = os_usecs(); +} |
