mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
scheduler: fix to an extremely weird bug
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user