mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add quit opcode to Net
This commit is contained in:
parent
ab3e05764e
commit
afeae79d45
2 changed files with 7 additions and 4 deletions
|
|
@ -25,12 +25,12 @@ pub(crate) enum Opcode {
|
||||||
|
|
||||||
/// [Internal] com llio interrupt callback
|
/// [Internal] com llio interrupt callback
|
||||||
ComInterrupt,
|
ComInterrupt,
|
||||||
|
|
||||||
/// [Internal] run the network stack code
|
/// [Internal] run the network stack code
|
||||||
NetPump,
|
NetPump,
|
||||||
|
|
||||||
/// Suspend/resume callback
|
/// Suspend/resume callback
|
||||||
SuspendResume,
|
SuspendResume,
|
||||||
|
/// Quit the server
|
||||||
|
Quit
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
|
#[derive(Debug, num_derive::FromPrimitive, num_derive::ToPrimitive)]
|
||||||
|
|
|
||||||
|
|
@ -646,9 +646,12 @@ fn xmain() -> ! {
|
||||||
// handle an suspend/resume state stuff here. right now, it's a NOP
|
// handle an suspend/resume state stuff here. right now, it's a NOP
|
||||||
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");
|
susres.suspend_until_resume(token).expect("couldn't execute suspend/resume");
|
||||||
}),
|
}),
|
||||||
|
Some(Opcode::Quit) => {
|
||||||
|
log::warn!("quit received");
|
||||||
|
break;
|
||||||
|
}
|
||||||
None => {
|
None => {
|
||||||
log::error!("couldn't convert opcode");
|
log::error!("couldn't convert opcode: {}", msg);
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue