diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-16 20:48:35 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-16 20:48:35 -0400 |
commit | 8a3973e46941b6a8c88a49594364a04ee4b1d84e (patch) | |
tree | 68ffb351283d9ac5694c5f37808d3ee1ed9fdc73 /sys/include/arch/amd64/cpu.h | |
parent | f6900b5c3b4832f48359fd761b80f8693a6735e8 (diff) |
kernel: accnt: Keep track of per-cpu stats
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/cpu.h')
-rw-r--r-- | sys/include/arch/amd64/cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index a5f09fb..a047cef 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -33,6 +33,7 @@ #include <sys/types.h> #include <sys/cdefs.h> #include <sys/proc.h> +#include <sys/sched.h> #include <sys/spinlock.h> #include <machine/tss.h> @@ -53,6 +54,7 @@ struct cpu_info { size_t lapic_tmr_freq; uint8_t irq_mask; vaddr_t shootdown_va; + struct sched_cpu stat; struct tss_entry *tss; struct proc *curtd; struct spinlock lock; @@ -67,6 +69,8 @@ void cpu_enable_smep(void); void cpu_disable_smep(void); struct cpu_info *cpu_get(uint32_t index); +struct sched_cpu *cpu_get_stat(uint32_t cpu_index); + uint32_t cpu_count(void); void cpu_shootdown_tlb(vaddr_t va); |