Closed trylimits closed 9 years ago
I cleaned up the asm code for timer ISR and dabt ISR according to the suggested pseudo code. The context is passed to the ISRs (timer and dabt) as reference/pointer which can be changed by the ISR itself. The context will be restored properly after the ISR handler returns.
The cleaned up asm code ensures a restored stack pointer in any case. I just tested the context switch with 5 processes and the os ran for 4 hours (probably forever). So it seems this change also solves the "1h-issue".
We should clean up the assembler code for a context switch, for both cases, switching from timer ISR and dabt handler. Pseudo code:
Atm we have separate assembler functions for getting the context and restoring the context. This way we still are facing the problem of not being able to restore the stack pointer if a context is restored.
The suggested concept will solve this issue.