Cleanup refill_new
Remove the now unused core argument from refill_new and replace all REFILL_NEW calls with direct calls. Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
This commit is contained in:
parent
ba262f6d75
commit
04c096128b
4 changed files with 6 additions and 16 deletions
|
|
@ -173,13 +173,7 @@ static inline bool_t sc_constant_bandwidth(sched_context_t *sc)
|
|||
}
|
||||
|
||||
/* Create a new refill in a non-active sc */
|
||||
#ifdef ENABLE_SMP_SUPPORT
|
||||
void refill_new(sched_context_t *sc, word_t max_refills, ticks_t budget, ticks_t period, word_t core);
|
||||
#define REFILL_NEW(sc, max_refills, budget, period, core) refill_new(sc, max_refills, budget, period, core)
|
||||
#else
|
||||
void refill_new(sched_context_t *sc, word_t max_refills, ticks_t budget, ticks_t period);
|
||||
#define REFILL_NEW(sc, max_refills, budget, period, core) refill_new(sc, max_refills, budget, period)
|
||||
#endif
|
||||
|
||||
/* Update refills in an active sc without violating bandwidth constraints */
|
||||
void refill_update(sched_context_t *sc, ticks_t new_period, ticks_t new_budget, word_t new_max_refills);
|
||||
|
|
|
|||
|
|
@ -412,10 +412,10 @@ BOOT_CODE cap_t create_it_asid_pool(cap_t root_cnode_cap)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
BOOT_CODE static bool_t configure_sched_context(tcb_t *tcb, sched_context_t *sc_pptr, ticks_t timeslice, word_t core)
|
||||
BOOT_CODE static bool_t configure_sched_context(tcb_t *tcb, sched_context_t *sc_pptr, ticks_t timeslice)
|
||||
{
|
||||
tcb->tcbSchedContext = sc_pptr;
|
||||
REFILL_NEW(tcb->tcbSchedContext, MIN_REFILLS, timeslice, 0, core);
|
||||
refill_new(tcb->tcbSchedContext, MIN_REFILLS, timeslice, 0);
|
||||
|
||||
tcb->tcbSchedContext->scTcb = tcb;
|
||||
return true;
|
||||
|
|
@ -459,7 +459,7 @@ BOOT_CODE bool_t create_idle_thread(void)
|
|||
SMP_COND_STATEMENT(NODE_STATE_ON_CORE(ksIdleThread, i)->tcbAffinity = i);
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
bool_t result = configure_sched_context(NODE_STATE_ON_CORE(ksIdleThread, i), SC_PTR(&ksIdleThreadSC[SMP_TERNARY(i, 0)]),
|
||||
usToTicks(CONFIG_BOOT_THREAD_TIME_SLICE * US_IN_MS), SMP_TERNARY(i, 0));
|
||||
usToTicks(CONFIG_BOOT_THREAD_TIME_SLICE * US_IN_MS));
|
||||
SMP_COND_STATEMENT(NODE_STATE_ON_CORE(ksIdleThread, i)->tcbSchedContext->scCore = i;)
|
||||
NODE_STATE_ON_CORE(ksIdleSC, i) = SC_PTR(&ksIdleThreadSC[SMP_TERNARY(i, 0)]);
|
||||
if (!result) {
|
||||
|
|
@ -513,7 +513,7 @@ BOOT_CODE tcb_t *create_initial_thread(cap_t root_cnode_cap, cap_t it_pd_cap, vp
|
|||
|
||||
/* initialise TCB */
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
if (!configure_sched_context(tcb, SC_PTR(rootserver.sc), usToTicks(CONFIG_BOOT_THREAD_TIME_SLICE * US_IN_MS), 0)) {
|
||||
if (!configure_sched_context(tcb, SC_PTR(rootserver.sc), usToTicks(CONFIG_BOOT_THREAD_TIME_SLICE * US_IN_MS))) {
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -153,11 +153,7 @@ static inline void maybe_add_empty_tail(sched_context_t *sc)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SMP_SUPPORT
|
||||
void refill_new(sched_context_t *sc, word_t max_refills, ticks_t budget, ticks_t period, word_t core)
|
||||
#else
|
||||
void refill_new(sched_context_t *sc, word_t max_refills, ticks_t budget, ticks_t period)
|
||||
#endif
|
||||
{
|
||||
sc->scPeriod = period;
|
||||
sc->scRefillHead = 0;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static exception_t invokeSchedControl_ConfigureFlags(sched_context_t *target, wo
|
|||
* period to 0, which means that the budget will always be ready to be refilled
|
||||
* and avoids some special casing.
|
||||
*/
|
||||
REFILL_NEW(target, MIN_REFILLS, budget, 0, core);
|
||||
refill_new(target, MIN_REFILLS, budget, 0);
|
||||
} else if (SMP_COND_STATEMENT(core == target->scCore &&) target->scRefillMax > 0 && target->scTcb
|
||||
&& isRunnable(target->scTcb)) {
|
||||
/* the scheduling context is active - it can be used, so
|
||||
|
|
@ -48,7 +48,7 @@ static exception_t invokeSchedControl_ConfigureFlags(sched_context_t *target, wo
|
|||
} else {
|
||||
/* the scheduling context isn't active - it's budget is not being used, so
|
||||
* we can just populate the parameters from now */
|
||||
REFILL_NEW(target, max_refills, budget, period, core);
|
||||
refill_new(target, max_refills, budget, period);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SMP_SUPPORT
|
||||
|
|
|
|||
Loading…
Reference in a new issue