mirror of https://github.com/m-labs/artiq.git
firmware: block session on startup kernel to be finished (#2046)
This commit is contained in:
parent
3f5cc4aa10
commit
394138f00f
|
@ -607,25 +607,18 @@ pub fn thread(io: Io, aux_mutex: &Mutex,
|
||||||
|
|
||||||
let mut kernel_thread = None;
|
let mut kernel_thread = None;
|
||||||
{
|
{
|
||||||
let aux_mutex = aux_mutex.clone();
|
let mut congress = congress.borrow_mut();
|
||||||
let routing_table = routing_table.clone();
|
info!("running startup kernel");
|
||||||
let up_destinations = up_destinations.clone();
|
match flash_kernel_worker(&io, &aux_mutex, &routing_table.borrow(), &up_destinations, &mut congress, "startup_kernel") {
|
||||||
let congress = congress.clone();
|
Ok(()) =>
|
||||||
respawn(&io, &mut kernel_thread, move |io| {
|
info!("startup kernel finished"),
|
||||||
let routing_table = routing_table.borrow();
|
Err(Error::KernelNotFound) =>
|
||||||
let mut congress = congress.borrow_mut();
|
info!("no startup kernel found"),
|
||||||
info!("running startup kernel");
|
Err(err) => {
|
||||||
match flash_kernel_worker(&io, &aux_mutex, &routing_table, &up_destinations, &mut congress, "startup_kernel") {
|
congress.finished_cleanly.set(false);
|
||||||
Ok(()) =>
|
error!("startup kernel aborted: {}", err);
|
||||||
info!("startup kernel finished"),
|
|
||||||
Err(Error::KernelNotFound) =>
|
|
||||||
info!("no startup kernel found"),
|
|
||||||
Err(err) => {
|
|
||||||
congress.finished_cleanly.set(false);
|
|
||||||
error!("startup kernel aborted: {}", err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Reference in New Issue