mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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:
parent
cb71a73708
commit
75564b4a5f
40 changed files with 173 additions and 193 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue