mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
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.
This commit is contained in:
@@ -363,7 +363,7 @@ extern "C" char const asm_signal_trampoline_end[];
|
||||
void create_signal_trampoline()
|
||||
{
|
||||
// NOTE: We leak this region.
|
||||
g_signal_trampoline_region = MM.allocate_kernel_region(PAGE_SIZE, "Signal trampolines", Memory::Region::Access::ReadWrite).leak_ptr();
|
||||
g_signal_trampoline_region = MM.allocate_kernel_region(PAGE_SIZE, "Signal trampolines", Memory::Region::Access::ReadWrite).release_value().leak_ptr();
|
||||
g_signal_trampoline_region->set_syscall_region(true);
|
||||
|
||||
size_t trampoline_size = asm_signal_trampoline_end - asm_signal_trampoline;
|
||||
|
||||
Reference in New Issue
Block a user