The compiler only save registers which are needed by the isr. Why you should do this by your own?

Hi all,

I'm working on a hard realtime application where I need to keep the time
where interrupts are disabled as small as possible.  I've noticed that a
typical ISR can take 40+ cycles to push registers onto the stack before
executing any user ISR code.  I'd like for interrupts to be re-enabled
immediately upon entering the ISR (before the context save).

The only way that I can think of to do this is to add the naked attribute
to my ISRs.  Unfortunately, this is very unattractive because then I have
to do all context save operations manually.  My ISRs are written in C and
therefore I wouldn't know which registers would need to be saved and would
be forced to save all of them --- an expensive proposition.

Is there a way to inject a simple sei() into the start of an ISR before
the automatic context save?

Thanks,
David Carr



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to