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/Lock.cpp | |
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/Lock.cpp')
-rw-r--r-- | Kernel/Lock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Lock.cpp b/Kernel/Lock.cpp index a2634d3b15..b7a313c3c0 100644 --- a/Kernel/Lock.cpp +++ b/Kernel/Lock.cpp @@ -127,7 +127,7 @@ void Lock::lock(Mode mode) } m_lock.store(false, AK::memory_order_release); dbgln_if(LOCK_TRACE_DEBUG, "Lock::lock @ {} ({}) waiting...", this, m_name); - m_queue.wait_on({}, m_name); + m_queue.wait_forever(m_name); dbgln_if(LOCK_TRACE_DEBUG, "Lock::lock @ {} ({}) waited", this, m_name); } } |