summaryrefslogtreecommitdiff
path: root/trap.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-14 18:42:34 +0000
committerrsc <rsc>2007-08-14 18:42:34 +0000
commitf1f8dd91bc4e8b58972f17416b664f3a950092cd (patch)
tree51f81ac32e9ee78629d7843d2e1101b0a6c0b414 /trap.c
parent29ff8d495c8cd67df6ee3830daea64eaa422756d (diff)
downloadxv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.gz
xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.bz2
xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.zip
formatting
Diffstat (limited to 'trap.c')
-rw-r--r--trap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trap.c b/trap.c
index 1faa49e..43b5a42 100644
--- a/trap.c
+++ b/trap.c
@@ -40,11 +40,11 @@ trap(struct trapframe *tf)
return;
}
- // PAGEBREAK: 10
// Increment nlock to make sure interrupts stay off
// during interrupt handler. Decrement before returning.
cpus[cpu()].nlock++;
+ // PAGEBREAK: 10
switch(tf->trapno){
case IRQ_OFFSET + IRQ_TIMER:
lapic_timerintr();
@@ -80,8 +80,8 @@ trap(struct trapframe *tf)
default:
if(cp) {
// Assume process divided by zero or dereferenced null, etc.
- cprintf("pid %d %s: unhandled trap %d on cpu %d eip %x -- kill proc\n",
- cp->pid, cp->name, tf->trapno, cpu(), tf->eip);
+ cprintf("pid %d %s: unhandled trap %d err %d on cpu %d eip %x -- kill proc\n",
+ cp->pid, cp->name, tf->trapno, tf->err, cpu(), tf->eip);
proc_exit();
}