diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-25 16:46:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-26 01:04:51 +0200 |
commit | a3b2b20782c2961e06a0f86f06f2955c00282612 (patch) | |
tree | 4989b7c7b1c65bc14d9c0ba629275cffb0cf3175 /Kernel/Scheduler.cpp | |
parent | 36225c0ae7c3648dddd1bcfc7b9cf8af67c809a5 (diff) | |
download | serenity-a3b2b20782c2961e06a0f86f06f2955c00282612.zip |
Kernel: Remove global MM lock in favor of SpinlockProtected
Globally shared MemoryManager state is now kept in a GlobalData struct
and wrapped in SpinlockProtected.
A small set of members are left outside the GlobalData struct as they
are only set during boot initialization, and then remain constant.
This allows us to access those members without taking any locks.
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r-- | Kernel/Scheduler.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 1c8789b972..3b0e59893d 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -261,10 +261,6 @@ void Scheduler::yield() void Scheduler::context_switch(Thread* thread) { - if (Memory::s_mm_lock.is_locked_by_current_processor()) { - PANIC("In context switch while holding Memory::s_mm_lock"); - } - thread->did_schedule(); auto* from_thread = Thread::current(); |