From 2bd68392cb81a896dcfd33da6bfa0776df7d6945 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 20 Mar 2025 18:35:50 +0100 Subject: [PATCH] write some documentation --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 6732885..c4a5dc5 100644 --- a/src/main.c +++ b/src/main.c @@ -44,12 +44,15 @@ int32_t main(int32_t argc, char** argv) { char const* const cpu_set_log = "set cpu %i to %hi\n"; for (int32_t id = 1; id < mcpus; id++) { // start at CPU 1, as CPU 0 is not writeable + // whilst the id is less then the amount of cpus to enable if (id < ncpus) { + // enable the cpu & print if it was actually set (if -v was given) if (cpu_setter(id, true, opts) && (opts & OPT_VERBOSE)) printf(cpu_set_log, id, 1); continue; } + // disable the cpu & print if it was actually set (if -v was given) if (cpu_setter(id, false, opts) && (opts & OPT_VERBOSE)) { printf(cpu_set_log, id, 0); continue;