From 03a844273ce3e806dbe2973dfc93df89377a28f1 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 20 Mar 2025 11:01:35 +0100 Subject: [PATCH] rename get/set -core to -cpu --- src/cpu.c | 4 ++-- src/cpu.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu.c b/src/cpu.c index b14ba35..2f05743 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -7,7 +7,7 @@ char const* const cpu_path = "/sys/devices/system/cpu/cpu%i/online"; -bool getcore(uint32_t id) { +bool getcpu(uint32_t id) { // get the file path char path[64]; // contains the file path (max length is 64 due to the path and a bunch of extra wiggle room) snprintf(path, 64, cpu_path, id); // writes the path using the id @@ -26,7 +26,7 @@ bool getcore(uint32_t id) { return !!state; } -void setcore(uint32_t id, bool state) { +void setcpu(uint32_t id, bool state) { char path[64]; snprintf(path, 64, cpu_path, id); diff --git a/src/cpu.h b/src/cpu.h index c434ca8..a335863 100644 --- a/src/cpu.h +++ b/src/cpu.h @@ -2,5 +2,5 @@ #include #include -bool getcore(uint32_t); // gets the state of core (id) -void setcore(uint32_t, bool); // sets the state of core (id) +bool getcpu(uint32_t); // gets the state of core (id) +void setcpu(uint32_t, bool); // sets the state of core (id)