mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
Kernel: Rename various *VMObject::create*() => try_create()
try_*() implies that it can fail (and they all return RefPtr with nullptr signalling failure.)
This commit is contained in:
parent
af8c74a328
commit
88d490566f
19 changed files with 35 additions and 35 deletions
|
@ -49,7 +49,7 @@ KResultOr<Region*> MemoryDevice::mmap(Process& process, FileDescription&, const
|
|||
return EINVAL;
|
||||
}
|
||||
|
||||
auto vmobject = AnonymousVMObject::create_for_physical_range(viewed_address, range.size());
|
||||
auto vmobject = AnonymousVMObject::try_create_for_physical_range(viewed_address, range.size());
|
||||
if (!vmobject)
|
||||
return ENOMEM;
|
||||
dbgln("MemoryDevice: Mapped physical memory at {} for range of {} bytes", viewed_address, range.size());
|
||||
|
|
|
@ -237,7 +237,7 @@ KResultOr<size_t> SB16::write(FileDescription&, u64, const UserOrKernelBuffer& d
|
|||
auto page = MM.allocate_supervisor_physical_page();
|
||||
if (!page)
|
||||
return ENOMEM;
|
||||
auto vmobject = AnonymousVMObject::create_with_physical_page(*page);
|
||||
auto vmobject = AnonymousVMObject::try_create_with_physical_page(*page);
|
||||
if (!vmobject)
|
||||
return ENOMEM;
|
||||
m_dma_region = MM.allocate_kernel_region_with_vmobject(*vmobject, PAGE_SIZE, "SB16 DMA buffer", Region::Access::Write);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue