summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2021-02-14 15:02:14 -0800
committerAndreas Kling <kling@serenityos.org>2021-02-15 08:28:57 +0100
commitddd79fe2cfa4759ed0fabbb875403248a918fa00 (patch)
tree036a81b28f2313c9d8a5b33806e7830dab43b2bb /Kernel/FileSystem
parent4ac286903d4ba055b89f134a8022e64726581708 (diff)
downloadserenity-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/FileSystem')
-rw-r--r--Kernel/FileSystem/FIFO.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp
index 5b419b1efa..72cda752ca 100644
--- a/Kernel/FileSystem/FIFO.cpp
+++ b/Kernel/FileSystem/FIFO.cpp
@@ -74,7 +74,7 @@ KResultOr<NonnullRefPtr<FileDescription>> FIFO::open_direction_blocking(FIFO::Di
if (m_writers == 0) {
locker.unlock();
- m_write_open_queue.wait_on({}, "FIFO");
+ m_write_open_queue.wait_forever("FIFO");
locker.lock();
}
}
@@ -84,7 +84,7 @@ KResultOr<NonnullRefPtr<FileDescription>> FIFO::open_direction_blocking(FIFO::Di
if (m_readers == 0) {
locker.unlock();
- m_read_open_queue.wait_on({}, "FIFO");
+ m_read_open_queue.wait_forever("FIFO");
locker.lock();
}
}