diff options
author | David Li <li.davidm96@gmail.com> | 2016-01-16 10:04:47 -0700 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2016-01-16 10:04:47 -0700 |
commit | 5f0a26caadbdd23caa48ea9826a5caab6e456225 (patch) | |
tree | c792909d880632b892e7cda9c079530517ea9662 /src/syscall.rs | |
parent | 657d1fb5aade758d0bd8c3fac8b22ca7d0d66aac (diff) |
Have simulator return reason for halting
Diffstat (limited to 'src/syscall.rs')
-rw-r--r-- | src/syscall.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<trap::Trap>; + + /// Determine, after each cycle, whether the processor should halt. + fn should_halt(&self) -> bool; } |