[ECOS] Is this a bug

TomChen chenqy_79@163.com
Fri Sep 24 15:05:00 GMT 2004


Hi All,

Kernel package src/sched/mlqueue.cxx
in function Cyg_ThreadQueue_Implementation::enqueue(Cyg_Thread *thread) ,

When there is more than one thread in the queue and the priority is 
neither higer than the head nor lower than the tail, we have to search 
the queue to find the place. The code for this is:

Cyg_Thread *qtmp = get_tail();
while ( thread->priority > qtmp->priority)
    qtmp = qtmp->get_prev();
qtmp->append( thread );

I think this should be:

Cyg_Thread *qtmp = get_tail();
while ( thread->priority *<* qtmp->priority)
    qtmp = qtmp->get_prev();
qtmp->append( thread );

Regards


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list