diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-02-14 15:02:14 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-15 08:28:57 +0100 |
commit | ddd79fe2cfa4759ed0fabbb875403248a918fa00 (patch) | |
tree | 036a81b28f2313c9d8a5b33806e7830dab43b2bb /Kernel/Tasks | |
parent | 4ac286903d4ba055b89f134a8022e64726581708 (diff) | |
download | serenity-ddd79fe2cfa4759ed0fabbb875403248a918fa00.zip |
Kernel: Add WaitQueue::wait_forever and it use it for all infinite waits.
In preparation for marking BlockingResult [[nodiscard]], there are a few
places that perform infinite waits, which we never observe the result of
the wait. Instead of suppressing them, add an alternate function which
returns void when performing and infinite wait.
Diffstat (limited to 'Kernel/Tasks')
-rw-r--r-- | Kernel/Tasks/FinalizerTask.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Tasks/FinalizerTask.cpp b/Kernel/Tasks/FinalizerTask.cpp index 77c34560d4..c06ecb9691 100644 --- a/Kernel/Tasks/FinalizerTask.cpp +++ b/Kernel/Tasks/FinalizerTask.cpp @@ -36,7 +36,7 @@ void FinalizerTask::spawn() finalizer_thread, "FinalizerTask", [](void*) { Thread::current()->set_priority(THREAD_PRIORITY_LOW); for (;;) { - g_finalizer_wait_queue->wait_on({}, "FinalizerTask"); + g_finalizer_wait_queue->wait_forever("FinalizerTask"); if (g_finalizer_has_work.exchange(false, AK::MemoryOrder::memory_order_acq_rel) == true) Thread::finalize_dying_threads(); |