diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-08-01 02:30:52 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-03 18:54:23 +0200 |
commit | 8d3b819daf659ee9ce7628d3ddd1e7ca3876fcf5 (patch) | |
tree | 034f9371576748a1d7dba72a3bb1a611aa0e0b4d /Kernel/FileSystem/FIFO.h | |
parent | 15cd5d324c9b8803fd6d7b4e9581da1375963bbe (diff) | |
download | serenity-8d3b819daf659ee9ce7628d3ddd1e7ca3876fcf5.zip |
Kernel: Handle OOM from DoubleBuffer creation in FIFO creation
Diffstat (limited to 'Kernel/FileSystem/FIFO.h')
-rw-r--r-- | Kernel/FileSystem/FIFO.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h index 39ef6b8042..e9c62ce232 100644 --- a/Kernel/FileSystem/FIFO.h +++ b/Kernel/FileSystem/FIFO.h @@ -24,7 +24,7 @@ public: Writer }; - static NonnullRefPtr<FIFO> create(uid_t); + static RefPtr<FIFO> try_create(uid_t); virtual ~FIFO() override; uid_t uid() const { return m_uid; } @@ -49,11 +49,11 @@ private: virtual StringView class_name() const override { return "FIFO"; } virtual bool is_fifo() const override { return true; } - explicit FIFO(uid_t); + explicit FIFO(uid_t, NonnullOwnPtr<DoubleBuffer> buffer); unsigned m_writers { 0 }; unsigned m_readers { 0 }; - DoubleBuffer m_buffer; + NonnullOwnPtr<DoubleBuffer> m_buffer; uid_t m_uid { 0 }; |