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

Kernel: Move ProcessPagingScope to its own files

This commit is contained in:
Andreas Kling 2020-03-01 15:38:09 +01:00
parent 2839bb0be1
commit 5e0c4d689f
6 changed files with 91 additions and 23 deletions

View file

@ -699,18 +699,4 @@ void MemoryManager::dump_kernel_regions()
}
}
ProcessPagingScope::ProcessPagingScope(Process& process)
{
ASSERT(Thread::current);
m_previous_cr3 = read_cr3();
MM.enter_process_paging_scope(process);
}
ProcessPagingScope::~ProcessPagingScope()
{
InterruptDisabler disabler;
Thread::current->tss().cr3 = m_previous_cr3;
write_cr3(m_previous_cr3);
}
}