mcs,sporadic: Remove calls to refill_unblock_check

refill_unblock_check is called in switchSchedContext whenever an SC is
switched to. Any other calls would have no effect:
- If the SC was already running then it would have had
  refill_unblock_check already called on it,
- If the SC was not already running, then it would have
  refill_unblock_check called when it was next switched to which would
  override the previous call.

Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
Kent McLeod
2021-03-03 16:24:16 +11:00
committed by Kent McLeod
parent 5b2a9250e3
commit 9f0381c2c2
2 changed files with 0 additions and 9 deletions

View File

@@ -45,14 +45,6 @@ static inline void maybeDonateSchedContext(tcb_t *tcb, notification_t *ntfnPtr)
sched_context_t *sc = SC_PTR(notification_ptr_get_ntfnSchedContext(ntfnPtr));
if (sc != NULL && sc->scTcb == NULL) {
schedContext_donate(sc, tcb);
if (sc != NODE_STATE(ksCurSC)) {
/* refill_unblock_check should not be called on the
* current SC as it is already running. The current SC
* may have been bound to a notificaiton object if the
* current thread was deleted in a long-running deletion
* that became preempted. */
refill_unblock_check(sc);
}
schedContext_resume(sc);
}
}

View File

@@ -181,7 +181,6 @@ static exception_t invokeSchedContext_YieldTo(sched_context_t *sc, word_t *buffe
bool_t return_now = true;
if (isSchedulable(sc->scTcb)) {
refill_unblock_check(sc);
if (SMP_COND_STATEMENT(sc->scCore != getCurrentCPUIndex() ||)
sc->scTcb->tcbPriority < NODE_STATE(ksCurThread)->tcbPriority) {
tcbSchedDequeue(sc->scTcb);