summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <rsc>2007-09-27 19:35:25 +0000
committerrsc <rsc>2007-09-27 19:35:25 +0000
commit8c8b748a2f0f10188c1a58c529239fff3a3b1b01 (patch)
tree0c80cc749ccf8e1ecd49ce846a452760a88561ca
parentb5dcebdbebcac9beb7efd6b27aeb390293dc8334 (diff)
downloadxv6-labs-8c8b748a2f0f10188c1a58c529239fff3a3b1b01.tar.gz
xv6-labs-8c8b748a2f0f10188c1a58c529239fff3a3b1b01.tar.bz2
xv6-labs-8c8b748a2f0f10188c1a58c529239fff3a3b1b01.zip
now spllo is okay
-rw-r--r--trap.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/trap.c b/trap.c
index 9e8d09a..7ef32ff 100644
--- a/trap.c
+++ b/trap.c
@@ -83,14 +83,8 @@ trap(struct trapframe *tf)
cp->pid, cp->name, tf->trapno, tf->err, cpu(), tf->eip);
cp->killed = 1;
}
-
- // Undo splhi but do not enable interrupts.
- // If you change this to spllo() you can get a
- // triple fault by just typing too fast at the prompt.
- // An interrupt stops us right here, and when that
- // interrupt tries to return, somehow the segment
- // registers are all invalid.
- --cpus[cpu()].nsplhi;
+
+ spllo();
// Force process exit if it has been killed and is in user space.
// (If it is still executing in the kernel, let it keep running