summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-29 20:10:24 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-29 22:19:42 +0200
commit68bf6db673e3a0070b5c47d7ab997d82d31e1526 (patch)
treee46af9f9ae539a76be6d50d13192f89071dacabd /Kernel/Scheduler.cpp
parented0e64943f7b779d2343471c76c997e4a6d3a438 (diff)
downloadserenity-68bf6db673e3a0070b5c47d7ab997d82d31e1526.zip
Kernel: Rename Spinlock::is_owned_by_current_thread()
...to is_owned_by_current_processor(). As Tom pointed out, this is much more accurate. :^)
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r--Kernel/Scheduler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp
index f6f3c74fe2..6dfd27a246 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Scheduler.cpp
@@ -163,7 +163,7 @@ bool Scheduler::dequeue_runnable_thread(Thread& thread, bool check_affinity)
void Scheduler::enqueue_runnable_thread(Thread& thread)
{
- VERIFY(g_scheduler_lock.is_locked_by_current_thread());
+ VERIFY(g_scheduler_lock.is_locked_by_current_processor());
if (thread.is_idle_thread())
return;
auto priority = thread_priority_to_priority_index(thread.priority());
@@ -266,7 +266,7 @@ bool Scheduler::yield()
bool Scheduler::context_switch(Thread* thread)
{
- if (Memory::s_mm_lock.is_locked_by_current_thread()) {
+ if (Memory::s_mm_lock.is_locked_by_current_processor()) {
PANIC("In context switch while holding Memory::s_mm_lock");
}
@@ -320,7 +320,7 @@ bool Scheduler::context_switch(Thread* thread)
void Scheduler::enter_current(Thread& prev_thread, bool is_first)
{
- VERIFY(g_scheduler_lock.is_locked_by_current_thread());
+ VERIFY(g_scheduler_lock.is_locked_by_current_processor());
// We already recorded the scheduled time when entering the trap, so this merely accounts for the kernel time since then
auto scheduler_time = Scheduler::current_time();
@@ -362,7 +362,7 @@ void Scheduler::prepare_after_exec()
{
// This is called after exec() when doing a context "switch" into
// the new process. This is called from Processor::assume_context
- VERIFY(g_scheduler_lock.is_locked_by_current_thread());
+ VERIFY(g_scheduler_lock.is_locked_by_current_processor());
VERIFY(!Processor::current_in_scheduler());
Processor::set_current_in_scheduler(true);
@@ -372,7 +372,7 @@ void Scheduler::prepare_for_idle_loop()
{
// This is called when the CPU finished setting up the idle loop
// and is about to run it. We need to acquire he scheduler lock
- VERIFY(!g_scheduler_lock.is_locked_by_current_thread());
+ VERIFY(!g_scheduler_lock.is_locked_by_current_processor());
g_scheduler_lock.lock();
VERIFY(!Processor::current_in_scheduler());