1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

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.
This commit is contained in:
Andreas Kling 2021-01-28 08:25:05 +01:00
parent aaf691c4ef
commit b72f067f0d
10 changed files with 10 additions and 19 deletions

View file

@ -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());

View file

@ -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,

View file

@ -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);