mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +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
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/05156cac94
|
@ -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…
Reference in a new issue