forked from M-Labs/artiq-zynq
subkernel: use negative ID for argument passing
This commit is contained in:
parent
facc98058c
commit
52e64fb2f9
@ -103,7 +103,7 @@ pub enum Message {
|
|||||||
SubkernelMsgSent,
|
SubkernelMsgSent,
|
||||||
#[cfg(has_drtio)]
|
#[cfg(has_drtio)]
|
||||||
SubkernelMsgRecvRequest {
|
SubkernelMsgRecvRequest {
|
||||||
id: u32,
|
id: i32,
|
||||||
timeout: i64,
|
timeout: i64,
|
||||||
tags: Vec<u8>,
|
tags: Vec<u8>,
|
||||||
},
|
},
|
||||||
|
@ -471,7 +471,7 @@ async fn handle_run_kernel(
|
|||||||
}
|
}
|
||||||
#[cfg(has_drtio)]
|
#[cfg(has_drtio)]
|
||||||
kernel::Message::SubkernelMsgRecvRequest { id, timeout, tags } => {
|
kernel::Message::SubkernelMsgRecvRequest { id, timeout, tags } => {
|
||||||
let message_received = subkernel::message_await(id, timeout, timer).await;
|
let message_received = subkernel::message_await(id as u32, timeout, timer).await;
|
||||||
let (status, count) = match message_received {
|
let (status, count) = match message_received {
|
||||||
Ok(ref message) => (kernel::SubkernelStatus::NoError, message.count),
|
Ok(ref message) => (kernel::SubkernelStatus::NoError, message.count),
|
||||||
Err(SubkernelError::Timeout) => (kernel::SubkernelStatus::Timeout, 0),
|
Err(SubkernelError::Timeout) => (kernel::SubkernelStatus::Timeout, 0),
|
||||||
@ -480,7 +480,7 @@ 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)
|
let status = subkernel::await_finish(aux_mutex, routing_table, timer, id as u32, timeout)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
match stream {
|
match stream {
|
||||||
|
Loading…
Reference in New Issue
Block a user