diff options
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -5,6 +5,7 @@ #include "defs.h" #include "x86.h" #include "traps.h" +#include "syscall.h" struct Gatedesc idt[256]; struct Pseudodesc idt_pd = { 0, sizeof(idt) - 1, (unsigned) &idt }; @@ -35,12 +36,6 @@ trap(struct Trapframe *tf) { int v = tf->tf_trapno; - if(tf->tf_cs == 0x8 && kernel_lock == cpu()) - cprintf("cpu %d: trap %d from %x:%x with lock=%d\n", - cpu(), v, tf->tf_cs, tf->tf_eip, kernel_lock); - - acquire_spinlock(&kernel_lock); // released in trapret in trapasm.S - if(v == T_SYSCALL){ struct proc *cp = curproc[cpu()]; if(cp == 0) @@ -55,7 +50,8 @@ trap(struct Trapframe *tf) panic("trap ret but not RUNNING"); if(tf != cp->tf) panic("trap ret wrong tf"); - if(read_esp() < (unsigned)cp->kstack || read_esp() >= (unsigned)cp->kstack + KSTACKSIZE) + if(read_esp() < (unsigned)cp->kstack || + read_esp() >= (unsigned)cp->kstack + KSTACKSIZE) panic("trap ret esp wrong"); if(cp->killed) proc_exit(); |