kern: update scheduler for new switch count tracking logic
This commit is contained in:
@@ -88,10 +88,12 @@ namespace ams::kern {
|
||||
if (m_state.should_count_idle) {
|
||||
if (AMS_LIKELY(highest_thread != nullptr)) {
|
||||
if (KProcess *process = highest_thread->GetOwnerProcess(); process != nullptr) {
|
||||
process->SetRunningThread(m_core_id, highest_thread, m_state.idle_count);
|
||||
/* Set running thread (and increment switch count). */
|
||||
process->SetRunningThread(m_core_id, highest_thread, m_state.idle_count, ++m_state.switch_count);
|
||||
}
|
||||
} else {
|
||||
m_state.idle_count++;
|
||||
/* Set idle count and switch count to switch count + 1. */
|
||||
m_state.idle_count = ++m_state.switch_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user