apr-cn-eng wrote on Thursday, June 26, 2008:
Environment:
FreeRTOS 5.0
ARM7 / NXP LPC2378
gcc 4.2.2 ; binutils 2.18
Based on some (maybe historic) comment in the forum and/or mailing list, I use the below construct for all my interrupt handlers.
Can anybody confirm or negate this is still needed or was needed at all ?
Thanks in advance,
A. Pretzsch
static void XXXHandler(void)
{
// real ISR
}
static void XXXIsr(void) __attribute__ ((naked));
static void XXXIsr(void)
{
/* Save the context of the interrupted task. */
portSAVE_CONTEXT();
/* Call the handler. This must be a separate function from the wrapper
to ensure the correct stack frame is set up. */
XXXHandler();
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();
}