forked from M-Labs/artiq-zynq
This commit is contained in:
parent
b99e97267d
commit
735b2ce1f9
|
@ -461,7 +461,9 @@ async fn handle_run_kernel(
|
||||||
Err(SubkernelError::SubkernelException) => {
|
Err(SubkernelError::SubkernelException) => {
|
||||||
error!("Exception in subkernel");
|
error!("Exception in subkernel");
|
||||||
// just retrieve the exception
|
// 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 {
|
match stream {
|
||||||
None => (),
|
None => (),
|
||||||
Some(stream) => {
|
Some(stream) => {
|
||||||
|
|
|
@ -6,7 +6,6 @@ use libboard_artiq::{drtio_routing::RoutingTable,
|
||||||
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
|
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
|
||||||
use libcortex_a9::mutex::Mutex;
|
use libcortex_a9::mutex::Mutex;
|
||||||
use log::error;
|
use log::error;
|
||||||
use log::info;
|
|
||||||
|
|
||||||
use crate::rtio_mgt::drtio;
|
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> {
|
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 {
|
match SUBKERNELS.async_lock().await.get(&id).unwrap().state {
|
||||||
SubkernelState::Finished {
|
SubkernelState::Finished {
|
||||||
status: FinishStatus::CommLost,
|
status: FinishStatus::CommLost,
|
||||||
|
@ -293,10 +291,10 @@ pub async fn message_await(id: u32, timeout: u64, timer: GlobalTimer) -> Result<
|
||||||
SubkernelState::Finished {
|
SubkernelState::Finished {
|
||||||
status: FinishStatus::CommLost,
|
status: FinishStatus::CommLost,
|
||||||
} => return Err(Error::CommLost),
|
} => return Err(Error::CommLost),
|
||||||
SubkernelState::Finished {
|
SubkernelState::Finished {
|
||||||
status: FinishStatus::Exception
|
status: FinishStatus::Exception,
|
||||||
} => return Err(Error::SubkernelException),
|
} => return Err(Error::SubkernelException),
|
||||||
_ => ()
|
_ => (),
|
||||||
}
|
}
|
||||||
task::r#yield().await;
|
task::r#yield().await;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue