Kernel: Fixes, corrections and asserts to scheduler and different svcs.

This commit is contained in:
Fernando Sahmkow 2020-03-08 12:51:24 -04:00
parent 4217e58a10
commit 6515c6e8c6
8 changed files with 38 additions and 38 deletions

View file

@ -133,6 +133,7 @@ u32 GlobalScheduler::SelectThreads() {
u32 cores_needing_context_switch{};
for (u32 core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
Scheduler& sched = kernel.Scheduler(core);
ASSERT(top_threads[core] == nullptr || top_threads[core]->GetProcessorID() == core);
if (update_thread(top_threads[core], sched)) {
cores_needing_context_switch |= (1ul << core);
}
@ -244,7 +245,7 @@ bool GlobalScheduler::YieldThreadAndWaitForLoadBalancing(Thread* yielding_thread
winner = yielding_thread;
}
} else {
winner = scheduled_queue[i].front();
winner = scheduled_queue[core_id].front();
}
if (kernel.GetCurrentHostThreadID() != core_id) {