diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-12-20 16:34:13 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-22 15:48:53 +0100 |
commit | bed5961fc21ea499ede556d6269df29b8a7a9e15 (patch) | |
tree | c84c9050a0dbbd948f54cb0829d0b98d42cf3af2 /Kernel | |
parent | c4e8509aacee087b05d9797ab013ac5b9020ea72 (diff) | |
download | serenity-bed5961fc21ea499ede556d6269df29b8a7a9e15.zip |
AK: Rename Bitmap::try_create() to ::create()
This is step 1 to removing `must_create()`.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Bus/PCI/Controller/HostController.cpp | 2 | ||||
-rw-r--r-- | Kernel/Memory/AnonymousVMObject.cpp | 2 | ||||
-rw-r--r-- | Kernel/Memory/PrivateInodeVMObject.cpp | 4 | ||||
-rw-r--r-- | Kernel/Memory/SharedInodeVMObject.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/Bus/PCI/Controller/HostController.cpp b/Kernel/Bus/PCI/Controller/HostController.cpp index 81754c2cc5..22cd93de5c 100644 --- a/Kernel/Bus/PCI/Controller/HostController.cpp +++ b/Kernel/Bus/PCI/Controller/HostController.cpp @@ -14,7 +14,7 @@ namespace Kernel::PCI { HostController::HostController(PCI::Domain const& domain) : m_domain(domain) - , m_enumerated_buses(Bitmap::try_create(256, false).release_value_but_fixme_should_propagate_errors()) + , m_enumerated_buses(Bitmap::create(256, false).release_value_but_fixme_should_propagate_errors()) { } diff --git a/Kernel/Memory/AnonymousVMObject.cpp b/Kernel/Memory/AnonymousVMObject.cpp index 291951324d..3dc4f90ccd 100644 --- a/Kernel/Memory/AnonymousVMObject.cpp +++ b/Kernel/Memory/AnonymousVMObject.cpp @@ -279,7 +279,7 @@ NonnullRefPtr<PhysicalPage> AnonymousVMObject::allocate_committed_page(Badge<Reg ErrorOr<void> AnonymousVMObject::ensure_cow_map() { if (m_cow_map.is_null()) - m_cow_map = TRY(Bitmap::try_create(page_count(), true)); + m_cow_map = TRY(Bitmap::create(page_count(), true)); return {}; } diff --git a/Kernel/Memory/PrivateInodeVMObject.cpp b/Kernel/Memory/PrivateInodeVMObject.cpp index 6f769c6df5..8463656e06 100644 --- a/Kernel/Memory/PrivateInodeVMObject.cpp +++ b/Kernel/Memory/PrivateInodeVMObject.cpp @@ -23,14 +23,14 @@ ErrorOr<NonnullLockRefPtr<PrivateInodeVMObject>> PrivateInodeVMObject::try_creat auto size = max(inode.size(), (offset + range_size)); VERIFY(size > 0); auto new_physical_pages = TRY(VMObject::try_create_physical_pages(size)); - auto dirty_pages = TRY(Bitmap::try_create(new_physical_pages.size(), false)); + auto dirty_pages = TRY(Bitmap::create(new_physical_pages.size(), false)); return adopt_nonnull_lock_ref_or_enomem(new (nothrow) PrivateInodeVMObject(inode, move(new_physical_pages), move(dirty_pages))); } ErrorOr<NonnullLockRefPtr<VMObject>> PrivateInodeVMObject::try_clone() { auto new_physical_pages = TRY(this->try_clone_physical_pages()); - auto dirty_pages = TRY(Bitmap::try_create(new_physical_pages.size(), false)); + auto dirty_pages = TRY(Bitmap::create(new_physical_pages.size(), false)); return adopt_nonnull_lock_ref_or_enomem<VMObject>(new (nothrow) PrivateInodeVMObject(*this, move(new_physical_pages), move(dirty_pages))); } diff --git a/Kernel/Memory/SharedInodeVMObject.cpp b/Kernel/Memory/SharedInodeVMObject.cpp index 29b2095d13..233af5979f 100644 --- a/Kernel/Memory/SharedInodeVMObject.cpp +++ b/Kernel/Memory/SharedInodeVMObject.cpp @@ -26,7 +26,7 @@ ErrorOr<NonnullLockRefPtr<SharedInodeVMObject>> SharedInodeVMObject::try_create_ if (auto shared_vmobject = inode.shared_vmobject()) return shared_vmobject.release_nonnull(); auto new_physical_pages = TRY(VMObject::try_create_physical_pages(size)); - auto dirty_pages = TRY(Bitmap::try_create(new_physical_pages.size(), false)); + auto dirty_pages = TRY(Bitmap::create(new_physical_pages.size(), false)); auto vmobject = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) SharedInodeVMObject(inode, move(new_physical_pages), move(dirty_pages)))); TRY(vmobject->inode().set_shared_vmobject(*vmobject)); return vmobject; @@ -35,7 +35,7 @@ ErrorOr<NonnullLockRefPtr<SharedInodeVMObject>> SharedInodeVMObject::try_create_ ErrorOr<NonnullLockRefPtr<VMObject>> SharedInodeVMObject::try_clone() { auto new_physical_pages = TRY(this->try_clone_physical_pages()); - auto dirty_pages = TRY(Bitmap::try_create(new_physical_pages.size(), false)); + auto dirty_pages = TRY(Bitmap::create(new_physical_pages.size(), false)); return adopt_nonnull_lock_ref_or_enomem<VMObject>(new (nothrow) SharedInodeVMObject(*this, move(new_physical_pages), move(dirty_pages))); } |