mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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:
parent
0223faf6f4
commit
92844a6af6
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ struct KmallocGlobalHeap {
|
|||
// heap expansion may have been triggered while holding some
|
||||
// other spinlock. If the expansion happens to need the same
|
||||
// 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
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
auto current_thread = Thread::current();
|
||||
// FIXME: We currently don't collect samples while idle.
|
||||
// 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;
|
||||
|
||||
auto lost_samples = delay.to_microseconds() / ideal_interval.to_microseconds();
|
||||
|
|
Loading…
Add table
Reference in a new issue