mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-29 20:50:22 +00:00
Merge pull request #188 from sched-ext/topology-fix-single-cpu
topology: support single CPU systems
This commit is contained in:
commit
3ad0fff855
@ -281,8 +281,13 @@ fn cpus_online() -> Result<Cpumask> {
|
||||
let (min, max) = match sscanf!(group.trim(), "{usize}-{usize}") {
|
||||
Ok((x, y)) => (x, y),
|
||||
Err(_) => {
|
||||
bail!("Failed to parse online cpus {}", group.trim());
|
||||
}
|
||||
match sscanf!(group.trim(), "{usize}") {
|
||||
Ok(x) => (x, x),
|
||||
Err(_) => {
|
||||
bail!("Failed to parse online cpus {}", group.trim());
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
for i in min..(max + 1) {
|
||||
mask.set_cpu(i)?;
|
||||
|
Loading…
Reference in New Issue
Block a user