From 66aca8aa35bc0b07c754d9ad95c808e4d91f58f1 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sat, 24 Aug 2024 16:07:11 +0200 Subject: Add multi-CPU support --- Makefile | 2 +- argparse.c | 14 ++++++- cpufreq.c | 47 +++++++--------------- cpulist.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++ cpulist.h | 7 ++++ cputemp2maxfreq.c | 55 +++++++++++++++++++++++--- cputemp2maxfreq.h | 3 ++ failsafe.c | 4 ++ generate_debug_h.sh | 2 +- 9 files changed, 202 insertions(+), 42 deletions(-) create mode 100644 cpulist.c create mode 100644 cpulist.h diff --git a/Makefile b/Makefile index e65cacf..737dfa7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -cputemp2maxfreq: version.o debug.o sysfs.o cpufreq.o failsafe.o argparse.o logger.o cputemp.o +cputemp2maxfreq: version.o debug.o sysfs.o cpufreq.o failsafe.o argparse.o logger.o cputemp.o cpulist.o version.h: generate_version_h.sh .git/index ./generate_version_h.sh > version.h diff --git a/argparse.c b/argparse.c index e46eab7..19a6493 100644 --- a/argparse.c +++ b/argparse.c @@ -30,6 +30,10 @@ void printhelp() " Default: Always set CPU to lowest frequency on exit\n" "-p