cargo fmt

This commit is contained in:
mwojcik 2023-10-09 11:50:47 +08:00
parent 7263862fd8
commit 8eb359ee42
4 changed files with 19 additions and 12 deletions

View File

@ -81,12 +81,12 @@ pub extern "C" fn await_message(id: u32, timeout: u64, min: u8, max: u8) {
match unsafe { KERNEL_CHANNEL_0TO1.as_mut().unwrap() }.recv() {
Message::SubkernelMsgRecvReply {
status: SubkernelStatus::NoError,
count
count,
} => {
if min > count || count > max {
artiq_raise!("SubkernelError", "Received more or less arguments than required")
}
},
}
Message::SubkernelMsgRecvReply {
status: SubkernelStatus::IncorrectState,
..

View File

@ -463,7 +463,10 @@ async fn handle_run_kernel(
control
.borrow_mut()
.tx
.async_send(kernel::Message::SubkernelMsgRecvReply { status: status, count: count })
.async_send(kernel::Message::SubkernelMsgRecvReply {
status: status,
count: count,
})
.await;
if let Ok(message) = message_received {
// receive code almost identical to RPC recv, except we are not reading from a stream

View File

@ -294,8 +294,14 @@ pub mod drtio {
match reply {
Ok(Packet::DestinationDownReply) => {
destination_set_up(routing_table, up_destinations, destination, false).await;
remote_dma::destination_changed(aux_mutex, routing_table, timer, destination, false)
.await;
remote_dma::destination_changed(
aux_mutex,
routing_table,
timer,
destination,
false,
)
.await;
subkernel::destination_changed(aux_mutex, routing_table, timer, destination, false)
.await;
}
@ -327,11 +333,11 @@ pub mod drtio {
);
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY };
}
Ok(packet) => {
match process_async_packets(aux_mutex, linkno, packet).await {
Some(packet) => error!("[DEST#{}] received unexpected aux packet: {:?}", destination, packet),
None => continue
Ok(packet) => match process_async_packets(aux_mutex, linkno, packet).await {
Some(packet) => {
error!("[DEST#{}] received unexpected aux packet: {:?}", destination, packet)
}
None => continue,
},
Err(e) => error!("[DEST#{}] communication failed ({})", destination, e),
}

View File

@ -118,9 +118,7 @@ fn process_aux_packet(
drtioaux::send(0, &drtioaux::Packet::ResetAck)
}
drtioaux::Packet::DestinationStatusRequest {
destination,
} => {
drtioaux::Packet::DestinationStatusRequest { destination } => {
#[cfg(has_drtio_routing)]
let hop = _routing_table.0[destination as usize][*_rank as usize];
#[cfg(not(has_drtio_routing))]