From 5f0a26caadbdd23caa48ea9826a5caab6e456225 Mon Sep 17 00:00:00 2001 From: David Li Date: Sat, 16 Jan 2016 10:04:47 -0700 Subject: Have simulator return reason for halting --- src/syscall.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/syscall.rs') diff --git a/src/syscall.rs b/src/syscall.rs index 6da9e47..01cc8f0 100644 --- a/src/syscall.rs +++ b/src/syscall.rs @@ -20,6 +20,10 @@ use trap; pub trait SyscallHandler { // Can't take cache because syscall can't stall + /// Implement the syscall requested by core_id. fn syscall(&mut self, core_id: usize, registers: &mut RegisterFile, mmu: &Mmu) -> Option; + + /// Determine, after each cycle, whether the processor should halt. + fn should_halt(&self) -> bool; } -- cgit v1.2.3