summaryrefslogtreecommitdiff
path: root/trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'trap.c')
-rw-r--r--trap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trap.c b/trap.c
index 0625e56..0c4a956 100644
--- a/trap.c
+++ b/trap.c
@@ -18,7 +18,7 @@ tvinit(void)
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE << 3, vectors[i], 0);
- SETGATE(idt[T_SYSCALL], 0, SEG_KCODE << 3, vectors[T_SYSCALL], 3);
+ SETGATE(idt[T_SYSCALL], 0, SEG_KCODE << 3, vectors[T_SYSCALL], DPL_USER);
}
void
@@ -56,7 +56,7 @@ trap(struct trapframe *tf)
// Force process exit if it has been killed and is in user space.
// (If it is still executing in the kernel, let it keep running
// until it gets to the regular system call return.)
- if((tf->cs&3) == 3 && cp->killed)
+ if((tf->cs&3) == DPL_USER && cp->killed)
proc_exit();
// Force process to give up CPU and let others run.