seL4/include/kernel
Adrian Danis 7c1a705336 SELFOUR-1198: correct restart PC
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`
2019-05-31 14:45:47 +10:00
..
boot.h boot: consolidate init_freemem 2019-05-15 14:03:40 +10:00
cspace.h unsigned int -> word_t 2015-12-10 10:45:21 +11:00
faulthandler.h SELFOUR-413: refactor libsel4 fault API 2016-11-25 12:29:07 +11:00
stack.h Fix trivial comment typos. 2018-03-27 10:51:26 +11:00
thread.h SELFOUR-1198: correct restart PC 2019-05-31 14:45:47 +10:00
traps.h SMP: move lock.h to architecture-independent include/smp 2017-01-16 15:21:50 +11:00
vspace.h SELFOUR-518: User-level log buffer 2016-08-15 15:06:38 +10:00