This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: need debugging help
- From: Andrew Lunn <andrew at lunn dot ch>
- To: harmon <lharmon at neo dot rr dot com>
- Cc: 'Andrew Lunn' <andrew at lunn dot ch>, ecos-discuss at sources dot redhat dot com
- Date: Thu, 5 Aug 2004 18:21:49 +0200
- Subject: Re: [ECOS] need debugging help
- References: <20040804185022.GF9839@lunn.ch> <000401c47b00$fe330730$8601a8c0@k7sem>
On Thu, Aug 05, 2004 at 11:29:23AM -0400, harmon wrote:
> Thanks for the advice. I figured out how to enable asserts, enabled
> them, ran my application and asserted where I was having a problem:
>
> The message is:
> ASSERT FAIL: <6>mutex.cxx[249]cyg_bool Cyg_Mutex::lock() Locking mutex I
> already own
> ASSERT FAIL: <6>mutex.cxx [249] cyg_bool Cyg_Mutex::lock()
>
>
> This problem occurs where I call
> cyg_flag_setbits(&UsbRspStateFlag,
> (1<<USB_STATE_IN_MESSAGE_DONE));
> from a DSR.
>
> I believe this might be a point where my DSR calls cyg_flag_setbits
> twice, once for each thread, and the second call results in problems.
No, that does not sound right. cyg_flash_setbits should not be doing
anything with mutex's. Also, you should not be using mutex's inside a
DSR. I think the mutex problem is being triggered from some other
location. You should be able to put a breakpoint in cyg_assert_failed
and then get a backtrace from gdb.
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