forked from Imagelibrary/seL4
Remove redundant sc_active checks
sc_sporadic() already calls sc_active. Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
This commit is contained in:
committed by
Kent McLeod
parent
b316072daa
commit
3978092885
@@ -91,7 +91,7 @@ void restart(tcb_t *target)
|
||||
cancelIPC(target);
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
setThreadState(target, ThreadState_Restart);
|
||||
if (sc_sporadic(target->tcbSchedContext) && sc_active(target->tcbSchedContext)
|
||||
if (sc_sporadic(target->tcbSchedContext)
|
||||
&& target->tcbSchedContext != NODE_STATE(ksCurSC)) {
|
||||
refill_unblock_check(target->tcbSchedContext);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void doReplyTransfer(tcb_t *sender, tcb_t *receiver, cte_t *slot, bool_t grant)
|
||||
assert(thread_state_get_replyObject(receiver->tcbState) == REPLY_REF(0));
|
||||
assert(reply->replyTCB == NULL);
|
||||
|
||||
if (sc_sporadic(receiver->tcbSchedContext) && sc_active(receiver->tcbSchedContext)
|
||||
if (sc_sporadic(receiver->tcbSchedContext)
|
||||
&& receiver->tcbSchedContext != NODE_STATE_ON_CORE(ksCurSC, receiver->tcbSchedContext->scCore)) {
|
||||
refill_unblock_check(receiver->tcbSchedContext);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void sendSignal(notification_t *ntfnPtr, word_t badge)
|
||||
possibleSwitchTo(tcb);
|
||||
})
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
if (sc_sporadic(tcb->tcbSchedContext) && sc_active(tcb->tcbSchedContext)) {
|
||||
if (sc_sporadic(tcb->tcbSchedContext)) {
|
||||
/* We know that the tcb can't have the current SC
|
||||
* as its own SC as this point as it should still be
|
||||
* associated with the current thread, or no thread.
|
||||
@@ -166,7 +166,7 @@ void sendSignal(notification_t *ntfnPtr, word_t badge)
|
||||
})
|
||||
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
if (sc_sporadic(dest->tcbSchedContext) && sc_active(dest->tcbSchedContext)) {
|
||||
if (sc_sporadic(dest->tcbSchedContext)) {
|
||||
/* We know that the receiver can't have the current SC
|
||||
* as its own SC as this point as it should still be
|
||||
* associated with the current thread.
|
||||
@@ -310,7 +310,7 @@ void completeSignal(notification_t *ntfnPtr, tcb_t *tcb)
|
||||
notification_ptr_set_state(ntfnPtr, NtfnState_Idle);
|
||||
#ifdef CONFIG_KERNEL_MCS
|
||||
maybeDonateSchedContext(tcb, ntfnPtr);
|
||||
if (sc_sporadic(tcb->tcbSchedContext) && sc_active(tcb->tcbSchedContext)) {
|
||||
if (sc_sporadic(tcb->tcbSchedContext)) {
|
||||
sched_context_t *sc = SC_PTR(notification_ptr_get_ntfnSchedContext(ntfnPtr));
|
||||
if (tcb->tcbSchedContext == sc && tcb->tcbSchedContext != NODE_STATE(ksCurSC)) {
|
||||
/* We know that the tcb can't have the current SC
|
||||
|
||||
Reference in New Issue
Block a user