Fixes a case where a thread can go from Running->Inactive->Restart and use a restart PC that is out of date. An out of date restart PC occurs when a thread was transitioned to running after being in a blocked state, but was never scheduled and so did not execute the traps code that updates the restart PC. A 'more correct' fix would be to update the restart PC when a thread is first transitioned to Running, but this results in lots of unnecessary update as * Frequently immediately schedule a thread after it is transitioned to running, making the update to restart PC completely redundant as it gets immediately overwritten * Rarely suspend threads making all the updates a 'high' cost for fixing an infrequent operation As a result this solution lazily fixes the restart PC only when we enter a state where we might need a correct restart PC, which currently in the kernel is only when we go from Running->Inactive, which can only happen in `suspend` |
||
|---|---|---|
| .. | ||
| boot.h | ||
| cspace.h | ||
| faulthandler.h | ||
| stack.h | ||
| thread.h | ||
| traps.h | ||
| vspace.h | ||