mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Use a WaitQueue to implement finalizer wakeup
This gets rid of the special "Lurking" thread state and replaces it with a generic WaitQueue :^)
This commit is contained in:
parent
5a45376180
commit
8bb98aa31b
5 changed files with 9 additions and 9 deletions
|
@ -319,8 +319,8 @@ extern "C" [[noreturn]] void init(u32 physical_address_for_kernel_page_tables)
|
|||
g_finalizer = current;
|
||||
current->set_priority(ThreadPriority::Low);
|
||||
for (;;) {
|
||||
current->wait_on(*g_finalizer_wait_queue);
|
||||
Thread::finalize_dying_threads();
|
||||
(void)current->block<Thread::SemiPermanentBlocker>(Thread::SemiPermanentBlocker::Reason::Lurking);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue