rename get/set -core to -cpu

This commit is contained in:
2025-03-20 11:01:35 +01:00
parent cc55e01281
commit 03a844273c
2 changed files with 4 additions and 4 deletions

View File

@@ -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);

View File

@@ -2,5 +2,5 @@
#include <stdbool.h>
#include <stdint.h>
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)