From 41af31be7ffbd34518b27aad56a4f54af6a8adf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sat, 12 Jun 2021 18:17:28 +0200 Subject: Rework CPU counting Currently htop does not support offline CPUs and hot-swapping, e.g. via echo 0 > /sys/devices/system/cpu/cpu2/online Split the current single cpuCount variable into activeCPUs and existingCPUs. Supersedes: #650 Related: #580 --- linux/LibSensors.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linux/LibSensors.h') diff --git a/linux/LibSensors.h b/linux/LibSensors.h index f3410175..a4c26e20 100644 --- a/linux/LibSensors.h +++ b/linux/LibSensors.h @@ -8,9 +8,10 @@ #include "linux/LinuxProcessList.h" -int LibSensors_init(FILE* input); +int LibSensors_init(void); void LibSensors_cleanup(void); +int LibSensors_reload(void); -void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int cpuCount); +void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int existingCPUs, unsigned int activeCPUs); #endif /* HEADER_LibSensors */ -- cgit v1.2.3