fix (scheduler): fixed bug that caused double execution of the threads first cpu time

This commit is contained in:
antifallobst 2023-04-30 12:46:14 +02:00
parent 2b8a39feac
commit 328d48e381
1 changed files with 2 additions and 2 deletions

View File

@ -328,8 +328,8 @@ cpu_state_T* scheduler_switch_context(cpu_state_T* state) {
g_kernel_page_map->entries[i] = new_thread->process->page_map->entries[i];
}
old_thread->cpu_time += 1;
g_scheduler.running_thread = g_scheduler.running_thread->global_next;
new_thread->cpu_time += 1;
g_scheduler.running_thread = new_thread;
g_scheduler.blocked = false;