xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 15ce79de141f66c7dd2f2948ce4584a2d31f7040
parent 00ce31c09cd46331a0b509ac7987dd3ce5def1f3
Author: kolya <kolya>
Date:   Wed, 15 Oct 2008 04:57:02 +0000

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

Diffstat:
Mtrap.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/trap.c b/trap.c @@ -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(); }