summaryrefslogtreecommitdiff
path: root/src/core.rs
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2026-01-02 12:44:50 +0100
committertaitep <taitep@taitep.se>2026-01-02 12:44:50 +0100
commit21fb6cbc8baab44c57c004e9f78904630044499d (patch)
tree283c913dd12cddc7e5ffffd938cdbd229692d51b /src/core.rs
parentbbc9e0b9ff62c31b6f8da0daff90a883957181f7 (diff)
Switch from std::mpsc channels to crossbeam
Diffstat (limited to 'src/core.rs')
-rw-r--r--src/core.rs13
1 files changed, 8 insertions, 5 deletions
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<CoreCmd>,
+ command_stream: crossbeam::channel::Receiver<CoreCmd>,
}
pub mod commands;
impl Core {
- pub fn new(mem: MemConfig, command_stream: mpsc::Receiver<CoreCmd>) -> Self {
+ pub fn new(mem: MemConfig, command_stream: crossbeam::channel::Receiver<CoreCmd>) -> Self {
Self {
x_regs: [0; 32],
pc: 0,
@@ -103,7 +103,10 @@ impl Core {
};
}
- fn debug_loop(&mut self, dbg_stream: mpsc::Receiver<gdb::DebugCommand>) -> anyhow::Result<()> {
+ fn debug_loop(
+ &mut self,
+ dbg_stream: crossbeam::channel::Receiver<gdb::DebugCommand>,
+ ) -> anyhow::Result<()> {
let mut breakpoints = HashSet::new();
loop {