[kernel][mp] use proper types when computing idle and active cpus

Also return a proper bool instead of an int. No functional change.
This commit is contained in:
Travis Geiselbrecht
2025-01-11 16:59:42 -08:00
parent 6d9a0b5c35
commit 0ac7a2d7cb

View File

@@ -49,12 +49,12 @@ struct mp_state {
extern struct mp_state mp;
static inline int mp_is_cpu_active(uint cpu) {
return mp.active_cpus & (1 << cpu);
static inline bool mp_is_cpu_active(uint cpu) {
return mp.active_cpus & (1UL << cpu);
}
static inline int mp_is_cpu_idle(uint cpu) {
return mp.idle_cpus & (1 << cpu);
static inline bool mp_is_cpu_idle(uint cpu) {
return mp.idle_cpus & (1UL << cpu);
}
/* must be called with the thread lock held */