fix: cpu.c was not coded correctly; some edge cases and using static-width integers

This commit is contained in:
2025-08-12 10:11:45 +02:00
parent bdccc05440
commit 82a33791de
3 changed files with 31 additions and 21 deletions

View File

@@ -1,6 +1,10 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "util/intdef.h"
bool getcpu(uint32_t); // gets the state of core (id)
void setcpu(uint32_t, bool); // sets the state of core (id)
/* gets the current state of a CPU thread,
* returns a boolean value (`1` for enabled, `0` for disabled) */
int cpu_getenabled(uint id);
/* sets the current state of a CPU thread.
* returns `0` upon success, `1` upon failure */
int cpu_setenabled(uint id, int state);