Skip to content
Snippets Groups Projects
Commit 15ce79de authored by kolya's avatar kolya
Browse files

check cp->killed before returning to user from a timer interrupt

parent 00ce31c0
No related branches found
No related tags found
No related merge requests found
......@@ -91,4 +91,8 @@ trap(struct trapframe *tf)
// If interrupts were on while locks held, would need to check nlock.
if(cp && cp->state == RUNNING && tf->trapno == IRQ_OFFSET+IRQ_TIMER)
yield();
// Check if the process has been killed since we yielded
if(cp && cp->killed && (tf->cs&3) == DPL_USER)
exit();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment