changeset 1766:a2c686b87032

* src/sched/mlqueue.cxx (enqueue): Fix bug in sorted queue insertion: priority test was inverted. Spotted by TomChen.
author nickg
date Fri, 24 Sep 2004 16:57:12 +0000
parents 64018bac4871
children 2542cbb3cd08
files packages/kernel/current/ChangeLog packages/kernel/current/src/sched/mlqueue.cxx
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/kernel/current/ChangeLog
+++ b/packages/kernel/current/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-24  Nick Garnett  <nickg@ecoscentric.com>
+
+	* src/sched/mlqueue.cxx (enqueue): Fix bug in sorted queue
+	insertion: priority test was inverted. Spotted by TomChen.
+
 2004-08-08  Bart Veer  <bartv@ecoscentric.com>
 
 	* cdl/counters.cdl: add new option for the clock interrupt
--- a/packages/kernel/current/src/sched/mlqueue.cxx
+++ b/packages/kernel/current/src/sched/mlqueue.cxx
@@ -799,7 +799,7 @@ Cyg_ThreadQueue_Implementation::enqueue(
             // Scan the queue until we find a higher or equal
             // priority thread.
 
-            while( thread->priority > qtmp->priority )
+            while( qtmp->priority > thread->priority )
                 qtmp = qtmp->get_prev();
 
             // Append ourself after the node pointed to by qtmp.