diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 01:36:14 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 01:55:27 +0200 |
commit | 75564b4a5f2b5452163571116ee9efaf5c3c65af (patch) | |
tree | ec672e92fcf3e7dca6ed51bce1c287319a9fc77d /Kernel/Memory/RingBuffer.cpp | |
parent | cb71a7370836c3b70038e2f718ee87f6fc286229 (diff) | |
download | serenity-75564b4a5f2b5452163571116ee9efaf5c3c65af.zip |
Kernel: Make kernel region allocators return KResultOr<NOP<Region>>
This expands the reach of error propagation greatly throughout the
kernel. Sadly, it also exposes the fact that we're allocating (and
doing other fallible things) in constructors all over the place.
This patch doesn't attempt to address that of course. That's work for
our future selves.
Diffstat (limited to 'Kernel/Memory/RingBuffer.cpp')
-rw-r--r-- | Kernel/Memory/RingBuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Memory/RingBuffer.cpp b/Kernel/Memory/RingBuffer.cpp index 4f7ea2dddc..96a82e54dc 100644 --- a/Kernel/Memory/RingBuffer.cpp +++ b/Kernel/Memory/RingBuffer.cpp @@ -11,7 +11,7 @@ namespace Kernel::Memory { RingBuffer::RingBuffer(String region_name, size_t capacity) - : m_region(MM.allocate_contiguous_kernel_region(page_round_up(capacity), move(region_name), Region::Access::Read | Region::Access::Write)) + : m_region(MM.allocate_contiguous_kernel_region(page_round_up(capacity), move(region_name), Region::Access::Read | Region::Access::Write).release_value()) , m_capacity_in_bytes(capacity) { } |