De-obfuscate local use of members of 'struct thread', for which we have
local variables, and group assignment.
This commit is contained in:
parent
c58ff411bc
commit
bc7b9f1dba
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user