mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
remove loop polling on GAM, seems unecessary
This commit is contained in:
parent
0cedcffd0c
commit
ca07645dce
1 changed files with 190 additions and 201 deletions
|
|
@ -181,7 +181,7 @@ impl ModalCanvases {
|
|||
#[xous::xous_main]
|
||||
fn xmain() -> ! {
|
||||
let debug1 = false; // debug level 1 - most general level
|
||||
let debugc = false;
|
||||
let debugc = true;
|
||||
log_server::init_wait().unwrap();
|
||||
info!("GAM: my PID is {}", xous::process::id());
|
||||
|
||||
|
|
@ -230,11 +230,8 @@ fn xmain() -> ! {
|
|||
let mut last_time: u64 = ticktimer_server::elapsed_ms(ticktimer_conn).unwrap();
|
||||
info!("GAM: entering main loop");
|
||||
loop {
|
||||
let maybe_env = xous::try_receive_message(gam_sid).unwrap();
|
||||
if debug1 { if maybe_env.is_some() {info!("GAM: Message: {:?}", maybe_env);} }
|
||||
match maybe_env {
|
||||
Some(envelope) => {
|
||||
if debug1 {info!("GAM: Message: {:?}", envelope); }
|
||||
let envelope = xous::receive_message(gam_sid).unwrap();
|
||||
if debug1 { info!("GAM: Message: {:?}", envelope);}
|
||||
if let Ok(opcode) = Opcode::try_from(&envelope.body) {
|
||||
if debug1 {info!("GAM: Opcode: {:?}", opcode);}
|
||||
match opcode {
|
||||
|
|
@ -439,13 +436,5 @@ fn xmain() -> ! {
|
|||
} else {
|
||||
panic!("GAM: unhandled message {:?}", envelope);
|
||||
}
|
||||
// /*
|
||||
},
|
||||
_ => xous::yield_slice(),
|
||||
// envelope implements Drop(), which includes a call to syscall::return_memory(self.sender, message.buf)
|
||||
}
|
||||
|
||||
// auto-redraw code used to be here, but I think it's a bad idea....causes more
|
||||
// graphics traffic than necessary? Trying out redraw-on-demand by clients.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue