This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Map and queue disagree
- From: Andrew Lunn <andrew at lunn dot ch>
- To: sandeep <shimple0 at yahoo dot com>
- Cc: Leandro Fanzone <leandro at hasar dot com>, ecos-discuss at sources dot redhat dot com
- Date: Tue, 30 Nov 2004 10:27:17 +0100
- Subject: Re: [ECOS] Map and queue disagree
- References: <41AB89E9.6080806@hasar.com> <41AC3846.2040909@yahoo.com>
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