diff options
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -29,10 +29,13 @@ void trap(struct Trapframe *tf) { int v = tf->tf_trapno; + + acquire_spinlock(&kernel_lock); // released in trapret in trapasm.S + cprintf("trap %d eip %x:%x\n", tf->tf_trapno, tf->tf_cs, tf->tf_eip); if(v == T_SYSCALL){ - curproc->tf = tf; + curproc[cpu()]->tf = tf; syscall(); return; } |