scheduler: Remove unnecessary check against disabled CPU

This commit is contained in:
Pawel Dziepak 2014-01-06 07:35:36 +01:00
parent 8cf8e53774
commit a5f45afa6c
2 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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);