forked from Imagelibrary/seL4
mcs: use local variable in restart
This eases verification by using a local variable which remains unchanged during execution of the function. This preserves semantics since refill_unblock_check will not modify the tcbSchedContext field of any TCB. Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
This commit is contained in:
committed by
Gerwin Klein
parent
b5cc70d753
commit
efd9426e17
@@ -93,11 +93,11 @@ void restart(tcb_t *target)
|
||||
cancelIPC(target);
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
setThreadState(target, ThreadState_Restart);
|
||||
if (sc_sporadic(target->tcbSchedContext)
|
||||
&& target->tcbSchedContext != NODE_STATE(ksCurSC)) {
|
||||
refill_unblock_check(target->tcbSchedContext);
|
||||
sched_context_t *sc = target->tcbSchedContext;
|
||||
if (sc_sporadic(sc) && sc != NODE_STATE(ksCurSC)) {
|
||||
refill_unblock_check(sc);
|
||||
}
|
||||
schedContext_resume(target->tcbSchedContext);
|
||||
schedContext_resume(sc);
|
||||
if (isSchedulable(target)) {
|
||||
possibleSwitchTo(target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user