scheduler: Remove unnecessary check against disabled CPU
This commit is contained in:
parent
8cf8e53774
commit
a5f45afa6c
@ -445,14 +445,14 @@ reschedule(int32 nextState)
|
||||
nextThreadData
|
||||
= cpu->ChooseNextThread(enqueueOldThread ? oldThreadData : NULL,
|
||||
putOldThreadAtBack);
|
||||
|
||||
// update CPU heap
|
||||
CoreCPUHeapLocker cpuLocker(core);
|
||||
cpu->UpdatePriority(nextThreadData->GetEffectivePriority());
|
||||
}
|
||||
|
||||
Thread* nextThread = nextThreadData->GetThread();
|
||||
ASSERT(!gCPU[thisCPU].disabled || thread_is_idle_thread(nextThread));
|
||||
// update CPU heap
|
||||
CoreCPUHeapLocker cpuLocker(core);
|
||||
cpu->UpdatePriority(nextThreadData->GetEffectivePriority());
|
||||
cpuLocker.Unlock();
|
||||
|
||||
if (nextThread != oldThread) {
|
||||
if (enqueueOldThread) {
|
||||
|
@ -152,8 +152,7 @@ CPUEntry::UpdatePriority(int32 priority)
|
||||
{
|
||||
SCHEDULER_ENTER_FUNCTION();
|
||||
|
||||
if (gCPU[fCPUNumber].disabled)
|
||||
return;
|
||||
ASSERT(!gCPU[fCPUNumber].disabled);
|
||||
|
||||
int32 oldPriority = CPUPriorityHeap::GetKey(this);
|
||||
if (oldPriority == priority)
|
||||
@ -176,6 +175,7 @@ CPUEntry::ComputeLoad()
|
||||
SCHEDULER_ENTER_FUNCTION();
|
||||
|
||||
ASSERT(gTrackLoad);
|
||||
ASSERT(!gCPU[fCPUNumber].disabled);
|
||||
ASSERT(fCPUNumber == smp_get_current_cpu());
|
||||
|
||||
int oldLoad = compute_load(fMeasureTime, fMeasureActiveTime, fLoad);
|
||||
|
Loading…
Reference in New Issue
Block a user