1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

Kernel: Store a pointer to the owner process in PageDirectory

This replaces the previous owning address space pointer. This commit
should not change any of the existing functionality, but it lays down
the groundwork needed to let us properly access the region table under
the address space spinlock during page fault handling.
This commit is contained in:
Idan Horowitz 2023-04-04 21:06:14 +03:00
parent 65641187ff
commit 003989e1b0
9 changed files with 33 additions and 32 deletions

View file

@ -488,7 +488,7 @@ ErrorOr<void> Process::do_exec(NonnullRefPtr<OpenFileDescription> main_program_d
auto new_process_name = TRY(KString::try_create(last_part));
auto new_main_thread_name = TRY(new_process_name->try_clone());
auto allocated_space = TRY(Memory::AddressSpace::try_create(nullptr));
auto allocated_space = TRY(Memory::AddressSpace::try_create(*this, nullptr));
OwnPtr<Memory::AddressSpace> old_space;
auto& new_space = m_space.with([&](auto& space) -> Memory::AddressSpace& {
old_space = move(space);