mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +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 {
|
loop {
|
||||||
|
#[cfg(feature = "debug-print")]
|
||||||
|
let last_pid = pid;
|
||||||
pid = next_pid_to_run(pid);
|
pid = next_pid_to_run(pid);
|
||||||
|
|
||||||
match pid {
|
match pid {
|
||||||
Some(pid) => {
|
Some(pid) => {
|
||||||
// #[cfg(feature = "debug-print")]
|
#[cfg(feature = "debug-print")]
|
||||||
// println!("switching to pid {}", pid);
|
println!(" PID{:?}->{:?}", last_pid.unwrap_or(0), pid); // keep this succinct as it happens often
|
||||||
xous_kernel::rsyscall(xous_kernel::SysCall::SwitchTo(pid, 0))
|
xous_kernel::rsyscall(xous_kernel::SysCall::SwitchTo(pid, 0))
|
||||||
.expect("couldn't switch to pid");
|
.expect("couldn't switch to pid");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue