mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
quit the ec updater thread once we're done checking for updates
unless we're debugging, there is no more need for its resources to be allocated.
This commit is contained in:
parent
7248f47ca8
commit
3e8065ee56
2 changed files with 8 additions and 0 deletions
|
|
@ -340,6 +340,7 @@ pub(crate) fn ecupdate_thread(sid: xous::SID) {
|
|||
},
|
||||
Some(UpdateOp::Quit) => {
|
||||
log::info!("quitting updater thread");
|
||||
xous::return_scalar(msg.sender, 1).unwrap();
|
||||
break;
|
||||
},
|
||||
None => {
|
||||
|
|
|
|||
|
|
@ -323,6 +323,13 @@ fn wrapped_main() -> ! {
|
|||
}
|
||||
_ => log::error!("Invalid return type from UpdateAuto"),
|
||||
}
|
||||
#[cfg(not(feature="dbg-ecupdate"))]
|
||||
{ // if we're not debugging, quit the updater thread -- might as well free up the memory and connections if nobody will ever use it again.
|
||||
send_message(ecup_conn,
|
||||
Message::new_blocking_scalar(ecup::UpdateOp::Quit.to_usize().unwrap(), 0, 0, 0, 0)
|
||||
).expect("couldn't quit updater thread");
|
||||
unsafe{xous::disconnect(ecup_conn).ok()};
|
||||
}
|
||||
|
||||
let keys = Arc::new(Mutex::new(
|
||||
root_keys::RootKeys::new(&xns, None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue