diff options
author | rtm <rtm> | 2006-06-22 20:47:23 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-06-22 20:47:23 +0000 |
commit | df5cc91659b0a2190072e6fc305060c8de95ed82 (patch) | |
tree | 0965b8a673f0e2ddab08b2135ab1499f6455c648 /trap.c | |
parent | bf49aedbed02cdbf40430178847d34c48c36c693 (diff) | |
download | xv6-labs-df5cc91659b0a2190072e6fc305060c8de95ed82.tar.gz xv6-labs-df5cc91659b0a2190072e6fc305060c8de95ed82.tar.bz2 xv6-labs-df5cc91659b0a2190072e6fc305060c8de95ed82.zip |
compile "user programs"
curproc array
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; } |