summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 83d73ede0..c8215e047 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -125,9 +125,26 @@ class BaseCPU : public MemObject
return interrupts;
}
- virtual void postInterrupt(int int_num, int index);
- virtual void clearInterrupt(int int_num, int index);
- virtual void clearInterrupts();
+ virtual void wakeup() = 0;
+
+ void
+ postInterrupt(int int_num, int index)
+ {
+ interrupts->post(int_num, index);
+ wakeup();
+ }
+
+ void
+ clearInterrupt(int int_num, int index)
+ {
+ interrupts->clear(int_num, index);
+ }
+
+ void
+ clearInterrupts()
+ {
+ interrupts->clearAll();
+ }
bool
checkInterrupts(ThreadContext *tc) const