This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Prioritized queue insertion fix



Index: kernel/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.120
diff -u -5 -r1.120 ChangeLog
--- kernel/current/ChangeLog	8 Aug 2004 21:12:26 -0000	1.120
+++ kernel/current/ChangeLog	24 Sep 2004 16:48:32 -0000
@@ -1,5 +1,10 @@
+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
 	priority.
 
Index: kernel/current/src/sched/mlqueue.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/src/sched/mlqueue.cxx,v
retrieving revision 1.18
diff -u -5 -r1.18 mlqueue.cxx
--- kernel/current/src/sched/mlqueue.cxx	23 May 2002 23:06:54 -0000	1.18
+++ kernel/current/src/sched/mlqueue.cxx	24 Sep 2004 16:48:42 -0000
@@ -797,11 +797,11 @@
             Cyg_Thread *qtmp = get_tail();
 
             // 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.
                 
             qtmp->append( thread );


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]