task2 finished

This commit is contained in:
2025-05-27 15:59:57 +08:00
parent 5292fdc6ac
commit bd21012f73
6 changed files with 70 additions and 4 deletions

View File

@ -94,11 +94,12 @@ struct proc {
// wait_lock must be held when using this:
struct proc *parent; // Parent process
// these are private to the process, so p->lock need not be held.
// these are private to the process, so p->lock need not be held.
uint64 kstack; // Virtual address of kernel stack
uint64 sz; // Size of process memory (bytes)
pagetable_t pagetable; // User page table
// 进程的结构体中需要加上usyscall字段
struct usyscall *usyscall; // data page for usyscall
struct trapframe *trapframe; // data page for trampoline.S
struct context context; // swtch() here to run process
struct file *ofile[NOFILE]; // Open files