Skip to content
Snippets Groups Projects
Commit 521f7e3c authored by Michael McInerney's avatar Michael McInerney Committed by Gerwin Klein
Browse files

mcs: remove getKernelWcetTicks from refill_ready


Previously, a refill would be ready if its head time
was at most getKernelWcetTicks after the current time.
This would mean that refill_unblock_check could
bring a refill's time forward, which violates an
invariant (namely that the time of the last refill
is at most the period from the time of the head refill).

Moreover, since the time to exit the kernel is always
less than the WCET, this might result in us running
a thread whose refill time is in the future, which
seems to violate the timing model.

Signed-off-by: default avatarMichael McInerney <michael.mcinerney@proofcraft.systems>
parent d8f4a95b
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ static inline bool_t refill_sufficient(sched_context_t *sc, ticks_t usage)
*/
static inline bool_t refill_ready(sched_context_t *sc)
{
return refill_head(sc)->rTime <= (NODE_STATE(ksCurTime) + getKernelWcetTicks());
return refill_head(sc)->rTime <= NODE_STATE(ksCurTime);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment