summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorups <ups@FreeBSD.org>2005-05-19 01:08:30 +0000
committerups <ups@FreeBSD.org>2005-05-19 01:08:30 +0000
commitc8d93020ce6f440b51aaa0daedb71f965a3703c1 (patch)
treecc6ba15cb4b6aad885a39370e96fb8590915e0c8
parent050a3f3809cde7809c26de3701de449faec287cb (diff)
downloadFreeBSD-src-c8d93020ce6f440b51aaa0daedb71f965a3703c1.zip
FreeBSD-src-c8d93020ce6f440b51aaa0daedb71f965a3703c1.tar.gz
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
-rw-r--r--sys/kern/kern_switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 421cc31..530305c 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -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)
OpenPOWER on IntegriCloud