Fix a bug that caused preemption to happen for a thread in the same

ksegrp with the same priority as the currently running thread.
This can cause propagate_priority() to panic.

Pointy hat to: ups
This commit is contained in:
Stephan Uphoff 2005-05-19 01:08:30 +00:00
parent c46a9ea89b
commit 503c2ea34d

View File

@ -353,7 +353,7 @@ maybe_preempt_in_ksegrp(struct thread *td)
if (running_thread->td_ksegrp != td->td_ksegrp)
return;
if (td->td_priority > running_thread->td_priority)
if (td->td_priority >= running_thread->td_priority)
return;
#ifdef PREEMPTION
if (running_thread->td_critnest > 1)
@ -442,7 +442,7 @@ maybe_preempt_in_ksegrp(struct thread *td)
}
#endif
if (td->td_priority > running_thread->td_priority)
if (td->td_priority >= running_thread->td_priority)
return;
#ifdef PREEMPTION
if (running_thread->td_critnest > 1)