mirror of
https://github.com/thepigeongenerator/cpusetcores.git
synced 2025-12-16 21:45:46 +01:00
write some documentation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user