Compare commits

..

1 Commits

Author SHA1 Message Date
Simon Renblad 16b0d258c5 comms: run idle kernel on start-up 2024-03-06 12:03:27 +08:00
1 changed files with 3 additions and 3 deletions

View File

@ -718,7 +718,7 @@ async fn handle_connection(
}
}
async fn flash_and_run_idle_kernel(
async fn load_and_run_idle_kernel(
buffer: &Vec<u8>,
control: &Rc<RefCell<kernel::Control>>,
up_destinations: &Rc<RefCell<[bool; drtio_routing::DEST_COUNT]>>,
@ -849,7 +849,7 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
select_biased! {
_ = (async {
if let Some(buffer) = &*idle_kernel {
flash_and_run_idle_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await;
load_and_run_idle_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await;
}
}).fuse() => (),
_ = terminate.async_wait().fuse() => ()
@ -885,7 +885,7 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
.await
.map_err(|e| warn!("connection terminated: {}", e));
if let Some(buffer) = &*idle_kernel {
flash_and_run_idle_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await;
load_and_run_idle_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await;
}
}).fuse() => (),
_ = terminate.async_wait().fuse() => ()