From bc7b9f1dba087c86be2b6986cf25f48da0b3b3b0 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Wed, 2 Oct 2002 16:39:39 +0000 Subject: [PATCH] De-obfuscate local use of members of 'struct thread', for which we have local variables, and group assignment. --- sys/kern/subr_trap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 272714a276cf..57ac165891e2 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -83,7 +83,7 @@ userret(td, frame, oticks) PROC_LOCK(p); mtx_lock_spin(&sched_lock); if (SIGPENDING(p) && ((p->p_sflag & PS_NEEDSIGCHK) == 0 || - (td->td_kse->ke_flags & KEF_ASTPENDING) == 0)) + (ke->ke_flags & KEF_ASTPENDING) == 0)) printf("failed to set signal flags properly for ast()\n"); mtx_unlock_spin(&sched_lock); PROC_UNLOCK(p); @@ -168,6 +168,9 @@ ast(struct trapframe *framep) td = curthread; p = td->td_proc; + kg = td->td_ksegrp; + ke = td->td_kse; + CTR3(KTR_SYSC, "ast: thread %p (pid %d, %s)", td, p->p_pid, p->p_comm); KASSERT(TRAPF_USERMODE(framep), ("ast in kernel mode")); @@ -177,7 +180,6 @@ ast(struct trapframe *framep) #endif mtx_assert(&Giant, MA_NOTOWNED); mtx_assert(&sched_lock, MA_NOTOWNED); - kg = td->td_ksegrp; td->td_frame = framep; /* @@ -188,7 +190,6 @@ ast(struct trapframe *framep) * ast() will be called again. */ mtx_lock_spin(&sched_lock); - ke = td->td_kse; sticks = ke->ke_sticks; flags = ke->ke_flags; sflag = p->p_sflag;