mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add context switching debug option
This commit is contained in:
parent
1b0fc181a5
commit
2b05626b69
1 changed files with 4 additions and 2 deletions
|
|
@ -105,12 +105,14 @@ pub extern "C" fn kmain() {
|
|||
}
|
||||
|
||||
loop {
|
||||
#[cfg(feature = "debug-print")]
|
||||
let last_pid = pid;
|
||||
pid = next_pid_to_run(pid);
|
||||
|
||||
match pid {
|
||||
Some(pid) => {
|
||||
// #[cfg(feature = "debug-print")]
|
||||
// println!("switching to pid {}", pid);
|
||||
#[cfg(feature = "debug-print")]
|
||||
println!(" PID{:?}->{:?}", last_pid.unwrap_or(0), pid); // keep this succinct as it happens often
|
||||
xous_kernel::rsyscall(xous_kernel::SysCall::SwitchTo(pid, 0))
|
||||
.expect("couldn't switch to pid");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue