summaryrefslogtreecommitdiff
path: root/trap.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 15:41:47 +0000
committerrsc <rsc>2006-07-16 15:41:47 +0000
commitef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed (patch)
tree3c5f126bb04d4c6c26dcb8295959fad224dfbf5d /trap.c
parent6b765c480f8c810fc495a32baa696bbeb75adc09 (diff)
downloadxv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.gz
xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.bz2
xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.zip
standardize on not using foo_ prefix in struct foo
Diffstat (limited to 'trap.c')
-rw-r--r--trap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trap.c b/trap.c
index 4c8a4bd..74ea864 100644
--- a/trap.c
+++ b/trap.c
@@ -28,17 +28,17 @@ tvinit()
void
idtinit()
{
- asm volatile("lidt %0" : : "g" (idt_pd.pd_lim));
+ asm volatile("lidt %0" : : "g" (idt_pd.lim));
}
void
trap(struct Trapframe *tf)
{
- int v = tf->tf_trapno;
+ int v = tf->trapno;
if(v == T_SYSCALL){
struct proc *cp = curproc[cpu()];
- int num = cp->tf->tf_regs.reg_eax;
+ int num = cp->tf->regs.eax;
if(cp == 0)
panic("syscall with no proc");
if(cp->killed)
@@ -78,7 +78,7 @@ trap(struct Trapframe *tf)
// (If the kernel was executing at time of interrupt,
// don't kill the process. Let the process get back
// out to its regular system call return.)
- if((tf->tf_cs&3) == 3 && cp->killed)
+ if((tf->cs&3) == 3 && cp->killed)
proc_exit();
// Force process to give up CPU and let others run.