fix (scheduler): fixed bug that caused double execution of the threads first cpu time
This commit is contained in:
parent
2b8a39feac
commit
328d48e381
|
@ -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];
|
g_kernel_page_map->entries[i] = new_thread->process->page_map->entries[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
old_thread->cpu_time += 1;
|
new_thread->cpu_time += 1;
|
||||||
g_scheduler.running_thread = g_scheduler.running_thread->global_next;
|
g_scheduler.running_thread = new_thread;
|
||||||
|
|
||||||
g_scheduler.blocked = false;
|
g_scheduler.blocked = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue