mwojcik 2023-11-02 14:50:36 +08:00
parent b99e97267d
commit 735b2ce1f9
2 changed files with 6 additions and 6 deletions

View File

@ -461,7 +461,9 @@ async fn handle_run_kernel(
Err(SubkernelError::SubkernelException) => {
error!("Exception in subkernel");
// just retrieve the exception
let status = subkernel::await_finish(aux_mutex, routing_table, timer, id, timeout).await.unwrap();
let status = subkernel::await_finish(aux_mutex, routing_table, timer, id, timeout)
.await
.unwrap();
match stream {
None => (),
Some(stream) => {

View File

@ -6,7 +6,6 @@ use libboard_artiq::{drtio_routing::RoutingTable,
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
use libcortex_a9::mutex::Mutex;
use log::error;
use log::info;
use crate::rtio_mgt::drtio;
@ -269,7 +268,6 @@ pub async fn message_handle_incoming(
}
pub async fn message_await(id: u32, timeout: u64, timer: GlobalTimer) -> Result<Message, Error> {
info!("awaiting message");
match SUBKERNELS.async_lock().await.get(&id).unwrap().state {
SubkernelState::Finished {
status: FinishStatus::CommLost,
@ -293,10 +291,10 @@ pub async fn message_await(id: u32, timeout: u64, timer: GlobalTimer) -> Result<
SubkernelState::Finished {
status: FinishStatus::CommLost,
} => return Err(Error::CommLost),
SubkernelState::Finished {
status: FinishStatus::Exception
SubkernelState::Finished {
status: FinishStatus::Exception,
} => return Err(Error::SubkernelException),
_ => ()
_ => (),
}
task::r#yield().await;
}