diff options
author | rtm <rtm> | 2006-07-12 01:48:35 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-07-12 01:48:35 +0000 |
commit | 4e8f237be819424f922399f8d121d9867b675541 (patch) | |
tree | 53459cfde9630b3ae0d2d46d0ce3d4c1ac423944 /trap.c | |
parent | b41b38d0da0854f3fa92967b70180ea1156154d4 (diff) | |
download | xv6-labs-4e8f237be819424f922399f8d121d9867b675541.tar.gz xv6-labs-4e8f237be819424f922399f8d121d9867b675541.tar.bz2 xv6-labs-4e8f237be819424f922399f8d121d9867b675541.zip |
no more big kernel lock
succeeds at usertests.c pipe test
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(); |