Hi everyone,

What does this attribute do?

Code:
void __attribute__ ((interrupt)) context_switch (void)
{
...
}
What I undrestand is that it basically does a return from interrupt (rti) assembly instruction for you.

so this would be the same:

Code:
void context_switch (void)
{
...
 volatile asm ("rti")
}
When I try this though! I get a program stopped with signal 4 error

So the __attribute__ ((interrupt)) must be doing more than an RTI instruction to return where it was.

Any help appreciated.

Ted