[ECOS] On Alarms...
Tue Jan 28 06:46:00 GMT 2003
Robert Cragie wrote:
>Jonathan Larmour wrote:
>>Milind Kopikare wrote:
>>>2> I was trying to toggle between starting a thread
>>>and suspending it using an Alarm.
>>> if (thread is suspended)
>>>But if I keep the Alarm resolution too small, say the
>>>Alarm triggers every 2 ticks (2*10ms), the thread does
>>>not resume. It's as if the scheduler is taking more
>>>than 2 ms to start the thread. Any insight into what's
>>>wrong? Ofcourse, if I give the ALARM resolution as
>>>100ms (10ticks), the thread toggles allright.
>>Just on the off-chance, is the thread doing any diagnostic output,
>>especially via GDB? If so, interrupts will be disabled while the
>>performed which could easily be up to 2 ticks. Diagnostic output
>>be used for "real" applications - use proper interrupt-driven
> Surely you have to apply the rule that no function which can potentially
> block can be called in a DSR callback? I remember initially having quite a
> few problems using interrupt driven driver calls in alarm callbacks, which
> all went away when I followed the rules for DSR callbacks, as outlined in
That's true, although resuming/suspending a thread from a DSR should work,
if their alarm_func() above is truly representative.
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss