mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:07:35 +00:00
Kernel: Don't take MM lock in MemoryManager::enter_address_space()
We're not accessing any of the MM members here. Also remove some redundant code to update CR3, since it calls activate_page_directory() which does exactly the same thing.
This commit is contained in:
parent
2607a6a4bd
commit
05156cac94
1 changed files with 0 additions and 3 deletions
|
@ -1018,9 +1018,6 @@ void MemoryManager::enter_address_space(AddressSpace& space)
|
||||||
{
|
{
|
||||||
auto* current_thread = Thread::current();
|
auto* current_thread = Thread::current();
|
||||||
VERIFY(current_thread != nullptr);
|
VERIFY(current_thread != nullptr);
|
||||||
SpinlockLocker lock(s_mm_lock);
|
|
||||||
|
|
||||||
current_thread->regs().cr3 = space.page_directory().cr3();
|
|
||||||
activate_page_directory(space.page_directory(), current_thread);
|
activate_page_directory(space.page_directory(), current_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue