diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-28 08:25:05 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-28 08:25:53 +0100 |
commit | b72f067f0daac88ebe66e3f714e517b995b48e7b (patch) | |
tree | a7a124e831ef9ec537f71614e3957f2b580735fa /Kernel | |
parent | aaf691c4efc1e43e83f13cdf403f69d89f889d38 (diff) | |
download | serenity-b72f067f0daac88ebe66e3f714e517b995b48e7b.zip |
Kernel+Userland: Remove unused "effective priority" from threads
This has been merged with the regular Thread::priority field after
the recent changes to the scheduler.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/ProcFS.cpp | 1 | ||||
-rw-r--r-- | Kernel/Scheduler.cpp | 5 | ||||
-rw-r--r-- | Kernel/Thread.h | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 9e5fe17c37..2ed82dffd8 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -795,7 +795,6 @@ static bool procfs$all(InodeIdentifier, KBufferBuilder& builder) thread_object.add("state", thread.state_string()); thread_object.add("cpu", thread.cpu()); thread_object.add("priority", thread.priority()); - thread_object.add("effective_priority", thread.effective_priority()); thread_object.add("syscall_count", thread.syscall_count()); thread_object.add("inode_faults", thread.inode_faults()); thread_object.add("zero_faults", thread.zero_faults()); diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index f4823f443c..54576f40a0 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -161,7 +161,7 @@ void Scheduler::queue_runnable_thread(Thread& thread) ASSERT(g_scheduler_lock.own_lock()); if (&thread == Processor::current().idle_thread()) return; - auto priority = thread_priority_to_priority_index(thread.effective_priority()); + auto priority = thread_priority_to_priority_index(thread.priority()); ScopedSpinLock lock(g_ready_queues_lock); ASSERT(thread.m_runnable_priority < 0); @@ -260,8 +260,7 @@ bool Scheduler::pick_next() dbgln("Scheduler[{}j]: Runnables:", Processor::id()); Scheduler::for_each_runnable([](Thread& thread) -> IterationDecision { - dbgln(" {:3}/{:2} {:12} @ {:04x}:{:08x}", - thread.effective_priority(), + dbgln(" {:2} {:12} @ {:04x}:{:08x}", thread.priority(), thread.state_string(), thread.tss().cs, diff --git a/Kernel/Thread.h b/Kernel/Thread.h index 11605fe6b8..1cd6e182ba 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -105,8 +105,6 @@ public: void set_priority(u32 p) { m_priority = p; } u32 priority() const { return m_priority; } - u32 effective_priority() const { return m_priority; } - void detach() { ScopedSpinLock lock(m_lock); |