diff options
author | Caoimhe <caoimhebyrne06@gmail.com> | 2023-04-03 19:49:08 +0100 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-04-04 10:30:09 +0200 |
commit | 3f69ef86c2569e4932055498229bcaeaefd9e6ca (patch) | |
tree | 9ee5dc8338b11666a633a122f0f59292ae8c7dfb /Kernel/Arch | |
parent | bd2011406ed9c2c7aa3964c7fad563db7abc059c (diff) | |
download | serenity-3f69ef86c2569e4932055498229bcaeaefd9e6ca.zip |
Kernel/aarch64: Implement `Processor::time_spent_idle()`
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/aarch64/Processor.cpp | 5 | ||||
-rw-r--r-- | Kernel/Arch/aarch64/Processor.h | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Kernel/Arch/aarch64/Processor.cpp b/Kernel/Arch/aarch64/Processor.cpp index 320346da51..1e049990eb 100644 --- a/Kernel/Arch/aarch64/Processor.cpp +++ b/Kernel/Arch/aarch64/Processor.cpp @@ -156,6 +156,11 @@ u32 Processor::clear_critical() return prev_critical; } +u64 Processor::time_spent_idle() const +{ + return m_idle_thread->time_in_user() + m_idle_thread->time_in_kernel(); +} + u32 Processor::smp_wake_n_idle_processors(u32 wake_count) { (void)wake_count; diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index f79ea3ef42..b63a21a232 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -241,11 +241,6 @@ public: TODO_AARCH64(); } - u64 time_spent_idle() const - { - TODO_AARCH64(); - } - static u32 count() { TODO_AARCH64(); @@ -259,6 +254,8 @@ public: static void deferred_call_queue(Function<void()>); + u64 time_spent_idle() const; + static u32 smp_wake_n_idle_processors(u32 wake_count); [[noreturn]] static void halt(); |