Trace syscall WIP
This commit is contained in:
parent
a14ba848b3
commit
11b52f63c1
5 changed files with 12 additions and 1 deletions
|
@ -111,4 +111,5 @@ struct proc {
|
|||
struct file *ofile[NOFILE]; // Open files
|
||||
struct inode *cwd; // Current directory
|
||||
char name[16]; // Process name (debugging)
|
||||
int mask; // Process mask
|
||||
};
|
||||
|
|
|
@ -101,6 +101,7 @@ extern u64 sys_unlink(void);
|
|||
extern u64 sys_link(void);
|
||||
extern u64 sys_mkdir(void);
|
||||
extern u64 sys_close(void);
|
||||
extern u64 sys_trace(void);
|
||||
|
||||
// An array mapping syscall numbers from syscall.h
|
||||
// to the function that handles the system call.
|
||||
|
@ -110,7 +111,7 @@ static u64 (*syscalls[])(void) = {
|
|||
[SYS_chdir] = sys_chdir, [SYS_dup] = sys_dup, [SYS_getpid] = sys_getpid, [SYS_sbrk] = sys_sbrk,
|
||||
[SYS_sleep] = sys_sleep, [SYS_uptime] = sys_uptime, [SYS_open] = sys_open, [SYS_write] = sys_write,
|
||||
[SYS_mknod] = sys_mknod, [SYS_unlink] = sys_unlink, [SYS_link] = sys_link, [SYS_mkdir] = sys_mkdir,
|
||||
[SYS_close] = sys_close,
|
||||
[SYS_close] = sys_close, [SYS_trace] = sys_trace,
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -22,3 +22,4 @@
|
|||
#define SYS_link 19
|
||||
#define SYS_mkdir 20
|
||||
#define SYS_close 21
|
||||
#define SYS_trace 22
|
||||
|
|
|
@ -89,3 +89,10 @@ sys_uptime(void)
|
|||
release(&tickslock);
|
||||
return xticks;
|
||||
}
|
||||
|
||||
u64
|
||||
sys_trace(void)
|
||||
{
|
||||
/* TODO: Implement sys_trace */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -36,3 +36,4 @@ entry("getpid");
|
|||
entry("sbrk");
|
||||
entry("sleep");
|
||||
entry("uptime");
|
||||
entry("trace");
|
||||
|
|
Loading…
Reference in a new issue