scheduler: remove debugging code

This commit is contained in:
Matheus
2022-09-11 12:54:08 -03:00
parent b3f0ca7cd6
commit 0e70f0a7fa
+6 -4
View File
@@ -211,6 +211,7 @@ void switch_thread(thread_t* thread){
arch_getcls()->thread = thread; arch_getcls()->thread = thread;
if(current->ctx != thread->ctx) if(current->ctx != thread->ctx)
vmm_switchcontext(thread->ctx); vmm_switchcontext(thread->ctx);
@@ -289,14 +290,13 @@ void sched_yieldtrampoline(thread_t* thread){
spinlock_release(&queues[thread->priority].lock); spinlock_release(&queues[thread->priority].lock);
thread->state = THREAD_STATE_WAITING; thread->state = THREAD_STATE_WAITING;
} }
thread = getnext(); thread = getnext();
thread->state = THREAD_STATE_RUNNING; thread->state = THREAD_STATE_RUNNING;
timer_resume(); timer_resume();
switch_thread(thread); switch_thread(thread);
@@ -422,8 +422,10 @@ void sched_runinit(){
timer_add(&arch_getcls()->schedreq, THREAD_QUANTUM, true); timer_add(&arch_getcls()->schedreq, THREAD_QUANTUM, true);
thread->extraregs.gsbase = 0xDEAD000C0FFE0000; printf("Switching to init thread\n");
switch_thread(thread); switch_thread(thread);
__builtin_unreachable();
} }