mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Fix handful of clang-tidy warnings in Scheduler
All of them "static member accessed through instance".
This commit is contained in:
parent
54c54dabdd
commit
cfce92f639
Notes:
sideshowbarker
2024-07-18 08:20:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cfce92f639d
1 changed files with 5 additions and 5 deletions
|
@ -77,7 +77,7 @@ static inline u32 thread_priority_to_priority_index(u32 thread_priority)
|
|||
|
||||
Thread& Scheduler::pull_next_runnable_thread()
|
||||
{
|
||||
auto affinity_mask = 1u << Processor::current().id();
|
||||
auto affinity_mask = 1u << Processor::id();
|
||||
|
||||
ScopedSpinLock lock(g_ready_queues_lock);
|
||||
auto priority_mask = g_ready_queues_mask;
|
||||
|
@ -115,7 +115,7 @@ Thread& Scheduler::pull_next_runnable_thread()
|
|||
|
||||
Thread* Scheduler::peek_next_runnable_thread()
|
||||
{
|
||||
auto affinity_mask = 1u << Processor::current().id();
|
||||
auto affinity_mask = 1u << Processor::id();
|
||||
|
||||
ScopedSpinLock lock(g_ready_queues_lock);
|
||||
auto priority_mask = g_ready_queues_mask;
|
||||
|
@ -151,7 +151,7 @@ bool Scheduler::dequeue_runnable_thread(Thread& thread, bool check_affinity)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (check_affinity && !(thread.affinity() & (1 << Processor::current().id())))
|
||||
if (check_affinity && !(thread.affinity() & (1 << Processor::id())))
|
||||
return false;
|
||||
|
||||
VERIFY(g_ready_queues_mask & (1u << priority));
|
||||
|
@ -439,7 +439,7 @@ UNMAP_AFTER_INIT void Scheduler::set_idle_thread(Thread* idle_thread)
|
|||
{
|
||||
idle_thread->set_idle_thread();
|
||||
Processor::current().set_idle_thread(*idle_thread);
|
||||
Processor::current().set_current_thread(*idle_thread);
|
||||
Processor::set_current_thread(*idle_thread);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT Thread* Scheduler::create_ap_idle_thread(u32 cpu)
|
||||
|
@ -562,7 +562,7 @@ void Scheduler::idle_loop(void*)
|
|||
#if SCHEDULE_ON_ALL_PROCESSORS
|
||||
yield();
|
||||
#else
|
||||
if (Processor::current().id() == 0)
|
||||
if (Processor::id() == 0)
|
||||
yield();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue