backporting "Host report for async error upon kernel termination" #156

Merged
sb10q merged 4 commits from stevefan1999/artiq-zynq:master into master 2021-12-06 17:38:55 +08:00
3 changed files with 3 additions and 5 deletions
Showing only changes of commit 24747f09cd - Show all commits

View File

@ -224,7 +224,7 @@ async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc<RefCell<kern
}
}
},
kernel::Message::KernelFinished { async_errors } => {
kernel::Message::KernelFinished(async_errors) => {
if let Some(stream) = stream {
write_header(stream, Reply::KernelFinished).await?;
write_i8(stream, async_errors as i8).await?;

View File

@ -193,7 +193,7 @@ pub extern "C" fn main_core1() {
}
info!("kernel finished");
let async_errors = unsafe { get_async_errors() };
core1_tx.send(Message::KernelFinished { async_errors });
core1_tx.send(Message::KernelFinished(async_errors));
}
_ => error!("Core1 received unexpected message: {:?}", message),
}

View File

@ -30,9 +30,7 @@ pub enum Message {
LoadCompleted,
LoadFailed,
StartRequest,
KernelFinished {
async_errors: u8
},
KernelFinished(u8),
stevefan1999 marked this conversation as resolved Outdated
Outdated
Review

Keep it on one line like the others. It's not special.

Keep it on one line like the others. It's not special.
KernelException(&'static eh_artiq::Exception<'static>, &'static [usize], u8),
RpcSend { is_async: bool, data: Vec<u8> },
RpcRecvRequest(*mut ()),