From 3f9b766a3e19eb9dde9779adc1ea91474c3efbb5 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 24 May 2024 13:23:34 -0400 Subject: kernel: cpu: Add cpu_count() for reading 'ncpu' Signed-off-by: Ian Moffett --- sys/kern/kern_cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/kern') diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index 97a7aa4..1779244 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -68,3 +68,9 @@ cpu_get(size_t i) return ci_list[i]; } + +size_t +cpu_count(void) +{ + return ncpu; +} -- cgit v1.2.3