mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
kernel: main: use iterator when printing processes
This avoids a C-style for() loop. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6987df997d
commit
ccc7264b79
1 changed files with 4 additions and 2 deletions
|
|
@ -168,8 +168,10 @@ pub extern "C" fn kmain() {
|
||||||
|
|
||||||
#[cfg(feature = "debug-print")]
|
#[cfg(feature = "debug-print")]
|
||||||
SystemServices::with(|system_services| {
|
SystemServices::with(|system_services| {
|
||||||
for test_idx in 0..system_services.processes.len() {
|
for (test_idx, process) in system_services.processes.iter().enumerate() {
|
||||||
println!("{:?}", system_services.processes[test_idx]);
|
if ! process.free() {
|
||||||
|
println!("PID {}: {:?}", test_idx + 1, process);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue