forked from M-Labs/nac3
cargo fmt
This commit is contained in:
parent
52e64fb2f9
commit
bfb582f99b
|
@ -451,12 +451,9 @@ async fn handle_run_kernel(
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
#[cfg(has_drtio)]
|
#[cfg(has_drtio)]
|
||||||
kernel::Message::SubkernelMsgSend {
|
kernel::Message::SubkernelMsgSend { id, destination, data } => {
|
||||||
id,
|
let res =
|
||||||
destination,
|
subkernel::message_send(aux_mutex, routing_table, timer, id, destination.unwrap(), data).await;
|
||||||
data,
|
|
||||||
} => {
|
|
||||||
let res = subkernel::message_send(aux_mutex, routing_table, timer, id, destination.unwrap(), data).await;
|
|
||||||
match res {
|
match res {
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
|
@ -26,7 +26,7 @@ enum KernelState {
|
||||||
MsgAwait {
|
MsgAwait {
|
||||||
max_time: Option<Milliseconds>,
|
max_time: Option<Milliseconds>,
|
||||||
id: u32,
|
id: u32,
|
||||||
tags: Vec<u8>
|
tags: Vec<u8>,
|
||||||
},
|
},
|
||||||
MsgSending,
|
MsgSending,
|
||||||
SubkernelAwaitLoad,
|
SubkernelAwaitLoad,
|
||||||
|
@ -180,7 +180,13 @@ impl MessageManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_incoming(&mut self, status: PayloadStatus, id: u32, length: usize, data: &[u8; MASTER_PAYLOAD_MAX_SIZE]) {
|
pub fn handle_incoming(
|
||||||
|
&mut self,
|
||||||
|
status: PayloadStatus,
|
||||||
|
id: u32,
|
||||||
|
length: usize,
|
||||||
|
data: &[u8; MASTER_PAYLOAD_MAX_SIZE],
|
||||||
|
) {
|
||||||
// called when receiving a message from master
|
// called when receiving a message from master
|
||||||
if status.is_first() {
|
if status.is_first() {
|
||||||
self.in_buffer = None;
|
self.in_buffer = None;
|
||||||
|
@ -726,7 +732,11 @@ impl<'a> Manager<'_> {
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
self.session.kernel_state = KernelState::MsgAwait { max_time: max_time, id:id, tags: tags };
|
self.session.kernel_state = KernelState::MsgAwait {
|
||||||
|
max_time: max_time,
|
||||||
|
id: id,
|
||||||
|
tags: tags,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
kernel::Message::SubkernelLoadRunRequest {
|
kernel::Message::SubkernelLoadRunRequest {
|
||||||
id,
|
id,
|
||||||
|
|
Loading…
Reference in New Issue