fix errors

This commit is contained in:
Simon Renblad 2024-10-28 15:35:40 +08:00
parent f28f1ee387
commit b68ebc9906
3 changed files with 6 additions and 6 deletions

View File

@ -488,14 +488,14 @@ async fn handle_run_kernel(
kernel::Message::RpcRecvRequest(slot) => slot, kernel::Message::RpcRecvRequest(slot) => slot,
other => panic!("expected root value slot from core1, not {:?}", other), other => panic!("expected root value slot from core1, not {:?}", other),
}; };
let remaining_tags = rpc::recv_return(&mut reader, &current_tags, slot, &mut |size| { let remaining_tags = rpc::recv_return(&mut reader, &current_tags, slot, &mut |size| -> Result<*mut ()> {
if size == 0 { if size == 0 {
0 as *mut () Ok(0 as *mut ())
} else { } else {
let mut control = control.borrow_mut(); let mut control = control.borrow_mut();
control.tx.send(kernel::Message::RpcRecvReply(Ok(size))); control.tx.send(kernel::Message::RpcRecvReply(Ok(size)));
match control.rx.recv() { match control.rx.recv() {
kernel::Message::RpcRecvRequest(slot) => slot, kernel::Message::RpcRecvRequest(slot) => Ok(slot),
other => { other => {
panic!("expected nested value slot from kernel CPU, not {:?}", other) panic!("expected nested value slot from kernel CPU, not {:?}", other)
} }

View File

@ -63,8 +63,8 @@ pub mod drtio {
} }
} }
impl From<DrtioError> for Error { impl<T> From<DrtioError<T>> for Error {
fn from(_error: DrtioError) -> Self { fn from(_error: DrtioError<T>) -> Self {
Error::AuxError Error::AuxError
} }
} }

View File

@ -9,7 +9,7 @@ use core::{slice, str};
use cslice::AsCSlice; use cslice::AsCSlice;
use dma::{Error as DmaError, Manager as DmaManager}; use dma::{Error as DmaError, Manager as DmaManager};
use io::{Cursor, Error as IoError, ProtoWrite, Write}; use io::{Cursor, Error as IoError, ProtoWrite, Write};
use ksupport::{eh_artiq, kernel, rpc}; use ksupport::{eh_artiq, kernel, rpc, rtio};
use libboard_artiq::{ use libboard_artiq::{
drtio_routing::RoutingTable, drtio_routing::RoutingTable,
drtioaux, drtioaux,