1
0
Fork 0

rerun idle kernel on finish

This commit is contained in:
Simon Renblad 2024-09-13 09:35:38 +08:00
parent 491e426222
commit e7614d2e8e
1 changed files with 12 additions and 10 deletions

View File

@ -837,16 +837,18 @@ pub fn main(timer: GlobalTimer, cfg: Config) {
can_restart_idle.signal(); can_restart_idle.signal();
match maybe_idle_kernel { match maybe_idle_kernel {
Some(buffer) => { Some(buffer) => {
info!("loading idle kernel"); loop {
match handle_flash_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await { info!("loading idle kernel");
Ok(_) => { match handle_flash_kernel(&buffer, &control, &up_destinations, &aux_mutex, &routing_table, timer).await {
info!("running idle kernel"); Ok(_) => {
match handle_run_kernel(None, &control, &up_destinations, &aux_mutex, &routing_table, timer).await { info!("running idle kernel");
Ok(_) => info!("idle kernel finished"), match handle_run_kernel(None, &control, &up_destinations, &aux_mutex, &routing_table, timer).await {
Err(_) => warn!("idle kernel running error") Ok(_) => info!("idle kernel finished"),
} Err(_) => warn!("idle kernel running error")
}, }
Err(_) => warn!("idle kernel loading error") },
Err(_) => warn!("idle kernel loading error")
}
} }
}, },
None => info!("no idle kernel found") None => info!("no idle kernel found")