Propagate TDF_NEEDRESCHED to replacement thread in sched_switch().

Reviewed by:    julian, jhb (in October)
Approved by:    sam (mentor)
MFC after:      4 weeks
This commit is contained in:
Stephan Uphoff 2004-12-07 18:17:24 +00:00
parent f4427f30f7
commit 5656474145
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138527

View file

@ -811,6 +811,9 @@ sched_switch(struct thread *td, struct thread *newtd, int flags)
}
}
if (newtd)
newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED);
td->td_lastcpu = td->td_oncpu;
td->td_flags &= ~TDF_NEEDRESCHED;
td->td_pflags &= ~TDP_OWEPREEMPT;