alarm task finished

This commit is contained in:
2025-06-18 16:02:24 +08:00
parent 4c08583743
commit c7c962ffef
10 changed files with 60 additions and 3 deletions

View File

@@ -132,6 +132,12 @@ found:
return 0;
}
if((p->pre_trapframe = (struct trapframe *)kalloc()) == 0){
freeproc(p);
release(&p->lock);
return 0;
}
// An empty user page table.
p->pagetable = proc_pagetable(p);
if(p->pagetable == 0){
@@ -160,6 +166,9 @@ freeproc(struct proc *p)
p->trapframe = 0;
if(p->pagetable)
proc_freepagetable(p->pagetable, p->sz);
if(p->pre_trapframe)
kfree((void*)p->pre_trapframe);
p->pre_trapframe = 0;
p->pagetable = 0;
p->sz = 0;
p->pid = 0;