diff options
author | rsc <rsc> | 2007-08-08 09:02:42 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-08 09:02:42 +0000 |
commit | b6dc6187f7b0868f0a08e80a20c2a13c32e519ed (patch) | |
tree | e680e25b97933c24e61c80ec9552860b0f359283 /trap.c | |
parent | f83f7ce2f6ef5b840d8af8ed2573e1934865406f (diff) | |
download | xv6-labs-b6dc6187f7b0868f0a08e80a20c2a13c32e519ed.tar.gz xv6-labs-b6dc6187f7b0868f0a08e80a20c2a13c32e519ed.tar.bz2 xv6-labs-b6dc6187f7b0868f0a08e80a20c2a13c32e519ed.zip |
add DPL_USER constant
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. |