Kernel: Access Processor static methods statically

SonarCloud flagged this "Code Smell", where we are accessing these
static methods as if they are instance methods. While it is technically
possible, it is very confusing to read when you realize they are static
functions.
This commit is contained in:
Brian Gianforcaro 2021-10-01 23:48:07 -07:00 committed by Andreas Kling
parent 0223faf6f4
commit 92844a6af6
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ struct KmallocGlobalHeap {
// heap expansion may have been triggered while holding some // heap expansion may have been triggered while holding some
// other spinlock. If the expansion happens to need the same // other spinlock. If the expansion happens to need the same
// spinlock we would deadlock. So, if we're in any lock, defer // spinlock we would deadlock. So, if we're in any lock, defer
Processor::current().deferred_call_queue(kmalloc_allocate_backup_memory); Processor::deferred_call_queue(kmalloc_allocate_backup_memory);
}); });
// Now that we added our backup memory, check if the backup heap // Now that we added our backup memory, check if the backup heap

View file

@ -141,7 +141,7 @@ public:
auto current_thread = Thread::current(); auto current_thread = Thread::current();
// FIXME: We currently don't collect samples while idle. // FIXME: We currently don't collect samples while idle.
// That will be an interesting mode to add in the future. :^) // That will be an interesting mode to add in the future. :^)
if (!current_thread || current_thread == Processor::current().idle_thread()) if (!current_thread || current_thread == Processor::idle_thread())
return; return;
auto lost_samples = delay.to_microseconds() / ideal_interval.to_microseconds(); auto lost_samples = delay.to_microseconds() / ideal_interval.to_microseconds();