This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...
- From: Andrew Lunn <andrew at lunn dot ch>
- To: "oliver munz @ s p e a g" <munz at speag dot ch>
- Cc: ecos-discuss at sourceware dot org
- Date: Thu, 16 Feb 2006 09:28:45 +0100
- Subject: Re: [ECOS] How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...
- References: <012801c632a4$c8b5c9a0$5a188481@haus.hellmutstrasse.ch>
On Thu, Feb 16, 2006 at 03:57:54AM +0100, oliver munz @ s p e a g wrote:
> I need a hint, what can go wrong in the usbs.c, or how to debug
> condition-variables...
>
> My problem is, that my code works reliable, if i use it whitout
> kernel-objects, and that it works only a while in the usbs.c infrastructur,
> and then blocks for ever...
>
> When the usbs_devtab_cwrite() blocks, i see, that the complete-function is
> called, but the thread never leave cyg_drv_cond_wait(&wait.signal);...
>
> Beacuse the blocking is random after 5..20 transmissions, i can't set a
> breake point on a interessting point, if i halt the system in the gdb i see
> the empty thread...
>
> what can be the reason for not realeasing the thread?
You might find kernel instrumentation useful for this problem.
http://ecos.sourceware.org/docs-latest/user-guide/kernel-instrumentation.html
It will log events into a circular buffer which you can later read out
and see what happened.
Gruss
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