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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146362

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)