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