-----Message d'origine-----
De : Philippe Gerum [mailto:[EMAIL PROTECTED]
Envoyé : mardi, 7. février 2006 14:45
À : ROSSIER Daniel
Cc : [email protected]
Objet : Re: [Xenomai-core] Watchdog/Interrupt management
ROSSIER Daniel wrote:
Hi all,
I've a - probably small ;-) - issue regarding the way how the watchdog
and interrupt management are working together.
I'd like to implement a watchdog in a task to ensure that a task is well
alive at periodic interval. For doing some tests, I've
implemented a small ISR which interceipts the keyboard interrupts (IRQ
1). The ISR is simply doing some busy wait burning CPU time,
but with a delay greater than the task period.
I assume that the ISR locks the rescheduling procedure as it is stated
in the API doc (BTW; many thanks for having solved the doc issue).
So, the task switching is temporarly suspended and the watchdog should
raise up an alarm after the ISR has been completed, right?
It doesn't.
Because Adeos disables interrupts by default when calling an ISR from a
non-Linux
domain (like Xenomai's). You can re-enable them to get nested interrupts
by doing
this in your ISR:
unsigned long flags;
rthal_local_irq_sync(flags);
<spin>
rthal_local_irq_restore(flags);