[ECOS] Re: cyg_alarm - which context
Thu Mar 11 09:33:00 GMT 2010
Martin Laabs wrote:
> I have an alarm handle which is called periodically. In which context is
> the function called? Obviously it is not a thread because
> cyg_thread_delay does not work.
> Anyway - is this handle-function interruptible by the scheduler or
> should I handle it like a interrupt routine? (I hope it does not block
Alarm handler functions are called in the context of the code which
increments the associated counter. In the case of alarms associated with
the eCos system clock, the context is the system clock DSR.
If you need a delay in your handling of the alarm trigger condition, I
suggest you do nothing more than post to a semaphore within your alarm
handler function. You can perform the remainder of your processing in a
regular thread which waits on the semaphore in a loop.
> Which stack is used by this function? It is the idle stack?
In the case of an alarm handler function called from a DSR, this will
depend on the setting of the
I hope this helps...
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss