From 8804bf6b03ee51e89815468e56f28a4a4879bc40 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 17 Apr 2003 22:02:47 +0000 Subject: Use local struct proc variables to reduce repeated td->td_proc dereferences and improve readability. --- sys/gnu/i386/fpemul/fpu_entry.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/gnu') diff --git a/sys/gnu/i386/fpemul/fpu_entry.c b/sys/gnu/i386/fpemul/fpu_entry.c index dde1b77f2375..589ac48d4458 100644 --- a/sys/gnu/i386/fpemul/fpu_entry.c +++ b/sys/gnu/i386/fpemul/fpu_entry.c @@ -198,7 +198,7 @@ char emulating = 0; static int math_emulate(struct trapframe * tframe) { - + struct proc *p; unsigned char FPU_modrm; unsigned short code; #ifdef LOOKAHEAD_LIMIT @@ -232,10 +232,11 @@ math_emulate(struct trapframe * tframe) #endif FPU_lookahead = FPU_LOOKAHEAD; - PROC_LOCK(curthread->td_proc); - if (curproc->p_flag & P_TRACED) + p = curthread->td_proc; + PROC_LOCK(p); + if (p->p_flag & P_TRACED) FPU_lookahead = 0; - PROC_UNLOCK(curthread->td_proc); + PROC_UNLOCK(p); do_another_FPU_instruction: -- cgit v1.3