[NSWI004] A04 question
Petr Tuma
petr.tuma at d3s.mff.cuni.cz
Mon Nov 23 14:18:11 CET 2020
Hello Georgii,
> I decided not to flood the mailing list and ask here.
Asking in the mailing list can save other teams time so it is really the preferred method. If anyone feels they get too many mails, they can set their settings to digest and only receive summaries.
> When the error context is pushed onto the stack, I guess it is my responsibility to pop it? And I need to do it in the end of handle_exception_general, because once I switch to another thread, it's gonna stay there forever.
There are multiple ways to implement the scheduler context switch inside the interrupt handler, I think those most straightforward do not require you to do any strange stack manipulation (such as trying to remove data from the frame of the calling function).
When you say the context saved by the exception handler prologue will stay on the stack forever, then that is not necessarily accurate. If you simply leave it as is, it will only stay there until you context switch back to the thread at some other timer interrupt, and that will then complete the exception handler epilogue normally.
Petr
More information about the NSWI004
mailing list