From 21fb6cbc8baab44c57c004e9f78904630044499d Mon Sep 17 00:00:00 2001 From: taitep Date: Fri, 2 Jan 2026 12:44:50 +0100 Subject: Switch from std::mpsc channels to crossbeam --- src/core.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core.rs') diff --git a/src/core.rs b/src/core.rs index 30d879a..4a05aa8 100644 --- a/src/core.rs +++ b/src/core.rs @@ -1,10 +1,10 @@ -// Copyright (c) 2025 taitep +// Copyright (c) 2025-2026 taitep // SPDX-License-Identifier: BSD-2-Clause // // This file is part of TRVE (https://gitea.taitep.se/taitep/trve) // See LICENSE file in the project root for full license text. -use std::{collections::HashSet, sync::mpsc}; +use std::collections::HashSet; use crate::{ core::commands::CoreCmd, @@ -19,13 +19,13 @@ pub struct Core { pub(crate) x_regs: [u64; 32], pub(crate) pc: u64, pub(crate) mem: MemConfig, - command_stream: mpsc::Receiver, + command_stream: crossbeam::channel::Receiver, } pub mod commands; impl Core { - pub fn new(mem: MemConfig, command_stream: mpsc::Receiver) -> Self { + pub fn new(mem: MemConfig, command_stream: crossbeam::channel::Receiver) -> Self { Self { x_regs: [0; 32], pc: 0, @@ -103,7 +103,10 @@ impl Core { }; } - fn debug_loop(&mut self, dbg_stream: mpsc::Receiver) -> anyhow::Result<()> { + fn debug_loop( + &mut self, + dbg_stream: crossbeam::channel::Receiver, + ) -> anyhow::Result<()> { let mut breakpoints = HashSet::new(); loop { -- cgit v1.2.3