In maybe_preempt(), ignore threads that are in an inconsistent state. This

is an effective band-aid for at least some of the scheduler corruption seen
recently.  The real fix will involve protecting threads while they are
inconsistent, and will come later.

Submitted by: julian
This commit is contained in:
Scott Long 2004-08-20 05:18:50 +00:00
parent e7290ad28f
commit 2c86298c6c

View File

@ -522,6 +522,10 @@ maybe_preempt(struct thread *td)
* to the new thread.
*/
ctd = curthread;
if ((ctd->td_kse == NULL) || (ctd->td_kse->ke_thread != ctd))
return (0);
pri = td->td_priority;
cpri = ctd->td_priority;
if (pri >= cpri || cold /* || dumping */ || TD_IS_INHIBITED(ctd) ||