shell: use try_ calls for messaging

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-08-30 17:41:02 +08:00
parent 8d438e4796
commit 60e652bd51

View file

@ -25,7 +25,7 @@ fn move_lfsr(mut lfsr: u32) -> u32 {
fn ensure_connection(server: xous::SID) -> xous::CID { fn ensure_connection(server: xous::SID) -> xous::CID {
loop { loop {
if let Ok(cid) = xous::syscall::connect(server) { if let Ok(cid) = xous::syscall::try_connect(server) {
return cid; return cid;
} }
xous::syscall::yield_slice(); xous::syscall::yield_slice();
@ -124,7 +124,7 @@ fn shell_main() -> ! {
let lfsr = move_lfsr(lfsr); let lfsr = move_lfsr(lfsr);
if lfsr.trailing_zeros() >= 3 { if lfsr.trailing_zeros() >= 3 {
loop { loop {
match xous::syscall::send_message( match xous::syscall::try_send_message(
log_conn, log_conn,
xous::Message::Scalar(xous::ScalarMessage { xous::Message::Scalar(xous::ScalarMessage {
id: counter + 4096, id: counter + 4096,