nanosleep blocks inifinity (internal rtems deathlock?) even CPU is in idle Task

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Nov 15 13:52:04 UTC 2012


On 11/15/2012 01:26 PM, Matthias Goldhoorn wrote:
> On 15.11.2012 11:52, Sebastian Huber wrote:
>> On 11/15/2012 10:44 AM, Matthias Goldhoorn wrote:
>>> Hello Again,
>>> new Problem i got the debugger working (will port it later to the wiki, needed
>>> adaptations for the compiler and mentioned scripts).
>>>
>>> It seems there is an bugg inside of rtems. My Code calls nanosleep and never
>>> returnes from there.
>>> My main-cread is idling, so there is no higher priority process running. I
>>> wonder why my thread which has called nanosleep never returns...
>>> Any suggestions?
>>
>> Do you have a clock driver configured, e.g.
>>
>> #define CONFIGURE_INIT
>>
>> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
>>
>> [...]
>>
>> #include <rtems/confdefs.h>
>>
> Yeah it's both defined.
> The nanosleep sometimes (mostly) works.
> Only if some interrupts during the sleep i got this non-awaking behavior it
> seems strange.
> Maybe broke my memory or stack anywhere. Could you tell me where the scheduler
> of rtems is located to that i can define a breakpoint into him and check why my
> thread is not waked up.
> I searching the timer interrupt function that really does the thread management.

Which BSP do you use and which RTEMS version?

You can set a break point to rtems_clock_tick() to see if the system timer 
works.  It should update the timer of the nanosleep() task and wake it up 
eventually.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.





More information about the users mailing list