m5: Fixed bug in atomic cpu destructor
authorBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:58 +0000 (13:55 -0800)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:58 +0000 (13:55 -0800)
src/cpu/simple/atomic.cc

index c092b5b1fde8fe1fe3da7065eebbe8ac1b13facf..05b4ca3e210bd3118364c498cef8add2ad08bc02 100644 (file)
@@ -171,6 +171,9 @@ AtomicSimpleCPU::AtomicSimpleCPU(AtomicSimpleCPUParams *p)
 
 AtomicSimpleCPU::~AtomicSimpleCPU()
 {
+    if (tickEvent.scheduled()) {
+        deschedule(tickEvent);
+    }
 }
 
 void