services: ticktimer: remove excess hosted printing

This was used to try and debug an issue in the ticktimer server, which
ended up being an issue in the kernel.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-11-11 16:23:23 +08:00
parent 5186594f17
commit 796c9c5998

View file

@ -173,37 +173,24 @@ mod implementation {
loop { loop {
let start_time = std::time::Instant::now(); let start_time = std::time::Instant::now();
let result = match timeout { let result = match timeout {
None => { None => sleep_receiver
eprintln!("\n\n>> NO TIMEOUT, SLEEPING FOREVER"); .recv()
sleep_receiver .map_err(|_| std::sync::mpsc::RecvTimeoutError::Disconnected),
.recv() Some(s) => sleep_receiver.recv_timeout(s),
.map_err(|_| std::sync::mpsc::RecvTimeoutError::Disconnected)
}
Some(s) => {
eprintln!("\n\n>> TIMEOUT PRESENT, SLEEPING FOR {:?}", s);
sleep_receiver.recv_timeout(s)
}
}; };
eprintln!("\n\n>> Got result: {:?}", result);
match result { match result {
Err(std::sync::mpsc::RecvTimeoutError::Timeout) => { Err(std::sync::mpsc::RecvTimeoutError::Timeout) => {
eprintln!("\n\n\nSENDING RETURN VALUE TO {}\n\n\n", sender);
xous::return_scalar(sender, 0).expect("couldn't send response"); xous::return_scalar(sender, 0).expect("couldn't send response");
// This is dangerous and may panic if the queue is full. // This is dangerous and may panic if the queue is full.
eprintln!(
"\n\n\nSENDING RECALCULATE SLEEP MESSAGE TO MAIN THREAD\n\n\n"
);
xous::try_send_message( xous::try_send_message(
cid, cid,
crate::api::Opcode::RecalculateSleep.into(), crate::api::Opcode::RecalculateSleep.into(),
) )
.unwrap(); .unwrap();
eprintln!("\n\n\nTRIED SENDING MESSAGE\n\n\n");
timeout = None; timeout = None;
} }
Err(std::sync::mpsc::RecvTimeoutError::Disconnected) => { Err(std::sync::mpsc::RecvTimeoutError::Disconnected) => {
eprintln!("SHUTTING DOWN");
return; return;
} }
Ok(SleepComms::InterruptSleep) => time_remaining_sender Ok(SleepComms::InterruptSleep) => time_remaining_sender
@ -324,9 +311,8 @@ fn xmain() -> ! {
}), }),
), ),
Opcode::RecalculateSleep => { Opcode::RecalculateSleep => {
info!("Recalculating Sleep");
recalculate_sleep(&mut ticktimer, &mut sleep_heap, None); recalculate_sleep(&mut ticktimer, &mut sleep_heap, None);
info!("Done recalculating"); info!("TickTimer: Done recalculating");
} }
} }
} else { } else {