diff options
author | jhb <jhb@FreeBSD.org> | 2003-04-17 22:02:47 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-04-17 22:02:47 +0000 |
commit | e7a906488ef751bb58925d8d3f618d76a3d9d4b9 (patch) | |
tree | f13cb05290ea9be7297d9025be3b73221fb5e153 /sys/gnu/i386 | |
parent | ac139f59144a448a02f3a05a97130f2435817fb8 (diff) | |
download | FreeBSD-src-e7a906488ef751bb58925d8d3f618d76a3d9d4b9.zip FreeBSD-src-e7a906488ef751bb58925d8d3f618d76a3d9d4b9.tar.gz |
Use local struct proc variables to reduce repeated td->td_proc dereferences
and improve readability.
Diffstat (limited to 'sys/gnu/i386')
-rw-r--r-- | sys/gnu/i386/fpemul/fpu_entry.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/gnu/i386/fpemul/fpu_entry.c b/sys/gnu/i386/fpemul/fpu_entry.c index dde1b77..589ac48 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: |