mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel: Finalizer should not go back to sleep if there's more to do
Before putting itself back on the wait queue, the finalizer task will now check if there's more work to do, and if so, do it first. :^) This patch also puts a bunch of process/thread debug logging behind PROCESS_DEBUG and THREAD_DEBUG since it was unbearable to debug this stuff with all the spam.
This commit is contained in:
parent
8d51352b96
commit
934b1d8a9b
5 changed files with 36 additions and 4 deletions
|
@ -68,6 +68,7 @@ Thread* current;
|
|||
Thread* g_finalizer;
|
||||
Thread* g_colonel;
|
||||
WaitQueue* g_finalizer_wait_queue;
|
||||
bool g_finalizer_has_work;
|
||||
static Process* s_colonel_process;
|
||||
u64 g_uptime;
|
||||
|
||||
|
@ -578,6 +579,7 @@ void Scheduler::initialize()
|
|||
{
|
||||
g_scheduler_data = new SchedulerData;
|
||||
g_finalizer_wait_queue = new WaitQueue;
|
||||
g_finalizer_has_work = false;
|
||||
s_redirection.selector = gdt_alloc_entry();
|
||||
initialize_redirection();
|
||||
s_colonel_process = Process::create_kernel_process(g_colonel, "colonel", nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue