This is the mail archive of the ecos-discuss@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]

Re: Map and queue disagree


On Tue, Nov 30, 2004 at 02:37:18PM +0530, sandeep wrote:
> Leandro Fanzone wrote:
> >I'm using eCos 2.0 i386 with multilevel queue scheduler, 32 priority 
> >levels, and scheduler timeslicing reduced to 1 tick. From time to time I 
> >have a random "rem_thread() Map and queue disagree". Any ideas on what 
> >can be happening?
> 
> try replacing
> 
> CYG_ASSERT( ((queue_map & (1<<pri))!=0) == ((!run_queue[pri].empty())!=0), 
> "Map and queue disagree");
> 
> in rem_thread (mlqueue.cxx), by (please check out the bracketing)
> 
> if (! ( ((queue_map & (1<<pri))!=0) == ((!run_queue[pri].empty())!=0) ) ) {
>   CYG_ASSERT(0,"Map and queue disagree");
> }
> 
> put a breakpoint INSIDE if, at CYG_ASSERT, whenever execution reaches that 
> figure out the value/state of queue_map, pri and run_queue[pri] .

You don't actually need to do this. Just put a breakpoint as
cyg_assert_fail(). You can then go back up the call stack to where the
assert macro was used and check out both the queue_map and the run
queue.

        Andrew

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


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