MIT 6.828 HW3 system calls
Notes of MIT 6.828 HW3
Part One: System call tracing
Modify the syscall() function in syscall.c to print out a line for each system call invocation.
1 | void |
Part Two: Date system call
Add a date system call to xv6.
In user.h
1 | // system calls |
In user.s
1 | SYSCALL(fork) |
In syscall.c
1 | extern int sys_chdir(void); |
In syscall.h
1 | // System call numbers |
In sysproc.c
1 | int |
Finally, create a new file date.c
, and add _date
to the UPROGS
definition in Makefile
.
1 |
|
And we can see the result in xv6 shell.
1 | ❯ make qemu-nox |