diff options
author | kolya <kolya> | 2008-10-15 04:57:02 +0000 |
---|---|---|
committer | kolya <kolya> | 2008-10-15 04:57:02 +0000 |
commit | 15ce79de141f66c7dd2f2948ce4584a2d31f7040 (patch) | |
tree | 21c74e4dcfb860672156bde7098339f7e38d4039 | |
parent | 00ce31c09cd46331a0b509ac7987dd3ce5def1f3 (diff) | |
download | xv6-labs-15ce79de141f66c7dd2f2948ce4584a2d31f7040.tar.gz xv6-labs-15ce79de141f66c7dd2f2948ce4584a2d31f7040.tar.bz2 xv6-labs-15ce79de141f66c7dd2f2948ce4584a2d31f7040.zip |
check cp->killed before returning to user from a timer interrupt
-rw-r--r-- | trap.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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(); } |