nobody wrote on Wednesday, July 06, 2005:
Am I getting this right?
The reason that the context has to be saved and then restored is that because the scheduler can not yield in the regular way while in interrupt context (as we assume there are no nested interrupts, and the yield is done through software interrupt).
So we restore the context at the end of every interrupt; If a context switch was performed somewhere along the ISR, the ISR assembly wrapper will just complete the action usually done by the software interrupt used for yield.
Otherwise, the context restore will do nothing.
What did I get wrong there?