mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00
Kernel: Mark the idle thread as active before switching it in
Otherwise, our code for dumping all thread stacks gets confused if it finds a thread that is in a 'running' state, but that isn't marked active.
This commit is contained in:
parent
20f2389e2a
commit
50b7183bd1
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ Thread& Scheduler::pull_next_runnable_thread()
|
|||
}
|
||||
priority_mask &= ~(1u << priority);
|
||||
}
|
||||
return *Processor::idle_thread();
|
||||
|
||||
auto* idle_thread = Processor::idle_thread();
|
||||
idle_thread->set_active(true);
|
||||
return *idle_thread;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue