scheduler: fix to an extremely weird bug

This commit is contained in:
Matheus
2022-09-11 22:25:32 -03:00
parent 81f414f7c0
commit 625eab5526
+1 -7
View File
@@ -199,8 +199,6 @@ void sched_timerhook(arch_regs* regs){
timer_add(&arch_getcls()->schedreq, THREAD_QUANTUM, false);
}
void switch_thread(thread_t* thread){
@@ -211,9 +209,7 @@ void switch_thread(thread_t* thread){
arch_getcls()->thread = thread;
if(current->ctx != thread->ctx)
vmm_switchcontext(thread->ctx);
vmm_switchcontext(thread->ctx);
arch_setkernelstack(thread->kernelstack);
@@ -422,8 +418,6 @@ void sched_runinit(){
timer_add(&arch_getcls()->schedreq, THREAD_QUANTUM, true);
printf("Switching to init thread\n");
switch_thread(thread);
__builtin_unreachable();