From 3be8237b6a2d7b6912f502c7a5b96735fd5bea33 Mon Sep 17 00:00:00 2001 From: James Braid Date: Wed, 28 Oct 2026 11:52:15 -0700 Subject: [PATCH] ip30: drop a service loop that no longer builds #343 was written against the older Octane and its merge brought back OctaneMachine::service_loop, which calls Ip30Bus::service and save. Those went with the move onto Physical, so main does not compile. Nothing starts the loop; the Octane's devices run their own threads and timers. Remove it. --- src/ip30_machine.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/ip30_machine.rs b/src/ip30_machine.rs index ede8ed79..760dbabf 100644 --- a/src/ip30_machine.rs +++ b/src/ip30_machine.rs @@ -501,27 +501,6 @@ impl OctaneMachine { } } - /// Host input into the UARTs, HEART's compare, and the flash written - /// back once the guest has stopped changing it. - fn service_loop(bus: Arc, running: Arc, paused: Arc) { - let mut save_check = Instant::now(); - while running.load(Ordering::Relaxed) { - if paused.load(Ordering::Relaxed) { - std::thread::sleep(Duration::from_millis(1)); - continue; - } - bus.service(); - if save_check.elapsed() >= Duration::from_secs(2) { - save_check = Instant::now(); - bus.save(); - } - // 1 ms, not the 100 µs this loop once paid: nothing it services - // (UART typing, the compare timer) is hurt by a millisecond, and - // a 10 kHz poll burns real CPU on small hosts for no return. - std::thread::sleep(Duration::from_millis(1)); - } - } - /// Stop the CPU, then every device: their threads are joined and their /// timers removed, so nothing touches memory or an interrupt line until /// [`Self::restart_peripherals`]. HEART's counter holds still meanwhile