CPU/Cache: Fix some errors exposed by valgrind
[gem5.git] / src / cpu / intr_control.hh
index c6f75abf0cd1f49eca7f2375d9205cac76f9fa61..2a63cf608cbfd476ec95e2a6e25d33b32f8b641c 100644 (file)
@@ -35,6 +35,7 @@
 #include <vector>
 #include "base/misc.hh"
 #include "cpu/base.hh"
+#include "params/IntrControl.hh"
 #include "sim/sim_object.hh"
 #include "sim/system.hh"
 
@@ -43,12 +44,23 @@ class IntrControl : public SimObject
 {
   public:
     System *sys;
-    IntrControl(const std::string &name, System *s);
+    typedef IntrControlParams Params;
+    IntrControl(const Params *p);
 
-    void clear(int int_num, int index = 0);
-    void post(int int_num, int index = 0);
     void clear(int cpu_id, int int_num, int index);
     void post(int cpu_id, int int_num, int index);
+
+    void
+    clear(int int_num, int index = 0)
+    {
+        clear(0, int_num, index);
+    }
+
+    void
+    post(int int_num, int index = 0)
+    {
+        post(0, int_num, index);
+    }
 };
 
 #endif // __INTR_CONTROL_HH__