1. HW3_XV6 System calls
修改xv6
来添加一个系统调用。
1.1. Part1: System call tracing
修改xv6
的内核,每个系统调用打印一行信息。
需要使用从github上down下来的xv6-public
工程。
Hint: modify the syscall() function in syscall.c.
proc结构体
// Per-process state
struct proc {
uint sz; // Size of process memory (bytes)
pde_t* pgdir; // Page table
char *kstack; // Bottom of kernel stack for this process
enum procstate state; // Process state
int pid; // Process ID
struct proc *parent; // Parent process
struct trapframe *tf; // Trap frame for current syscall
struct context *context; // swtch() here to run process
void *chan; // If non-zero, sleeping on chan
int killed; // If non-zero, have been killed
str