diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 929d5a8f..94d88421 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -231,7 +231,6 @@ async fn handle_run_kernel(stream: Option<&TcpStream>, control: &Rc, control: &Rc>, stream: Option<&TcpStream>) -> Result<()> { let mut control = control.borrow_mut(); - control.restart(); control.tx.async_send(kernel::Message::LoadRequest(Arc::new(buffer))).await; let reply = control.rx.async_recv().await; match *reply { diff --git a/src/runtime/src/kernel/control.rs b/src/runtime/src/kernel/control.rs index 95593de6..fb40abf6 100644 --- a/src/runtime/src/kernel/control.rs +++ b/src/runtime/src/kernel/control.rs @@ -4,14 +4,13 @@ use libsupport_zynq::boot::Core1; use super::{CHANNEL_0TO1, CHANNEL_1TO0, Message}; pub struct Control { - core1: Core1, pub tx: sync_channel::Sender, pub rx: sync_channel::Receiver, } impl Control { pub fn start() -> Self { - let core1 = Core1::start(true); + Core1::start(true); let (core0_tx, core1_rx) = sync_channel(4); let (core1_tx, core0_rx) = sync_channel(4); @@ -19,23 +18,8 @@ impl Control { *CHANNEL_1TO0.lock() = Some(core1_tx); Control { - core1, tx: core0_tx, rx: core0_rx, } } - - pub fn restart(&mut self) { - *CHANNEL_0TO1.lock() = None; - *CHANNEL_1TO0.lock() = None; - - self.core1.restart(); - - let (core0_tx, core1_rx) = sync_channel(4); - let (core1_tx, core0_rx) = sync_channel(4); - *CHANNEL_0TO1.lock() = Some(core1_rx); - *CHANNEL_1TO0.lock() = Some(core1_tx); - self.tx = core0_tx; - self.rx = core0_rx; - } }