summaryrefslogtreecommitdiff
path: root/src/dev/mc146818.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-09-16 20:24:05 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-09-16 20:24:05 -0700
commit3f9f4bf3d6ce9080adb03966599e0f1a98b091eb (patch)
tree31c4b767f6d06cfcbfbd8ea6d8155b8efc6894b3 /src/dev/mc146818.cc
parent2dd9f4fcf02c68eb86a6742576eecb3eef3b9ddf (diff)
downloadgem5-3f9f4bf3d6ce9080adb03966599e0f1a98b091eb.tar.xz
devices: undo cset 017baf09599f that added timer drain functions.
It's not the right fix for the checkpoint deadlock problem Brad was having, and creates another bug where the system can deadlock on restore. Brad can't reproduce the original bug right now, so we'll wait until it arises again and then try to fix it the right way then.
Diffstat (limited to 'src/dev/mc146818.cc')
-rw-r--r--src/dev/mc146818.cc25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/dev/mc146818.cc b/src/dev/mc146818.cc
index fd70b503b..16ed58e46 100644
--- a/src/dev/mc146818.cc
+++ b/src/dev/mc146818.cc
@@ -40,7 +40,6 @@
#include "base/trace.hh"
#include "dev/mc146818.hh"
#include "dev/rtcreg.h"
-#include "sim/sim_object.hh"
using namespace std;
@@ -106,12 +105,8 @@ MC146818::MC146818(EventManager *em, const string &n, const struct tm time,
MC146818::~MC146818()
{
- if (tickEvent.scheduled()) {
- deschedule(tickEvent);
- }
- if (event.scheduled()) {
- deschedule(event);
- }
+ deschedule(tickEvent);
+ deschedule(event);
}
void
@@ -208,20 +203,6 @@ MC146818::tickClock()
setTime(*gmtime(&calTime));
}
-unsigned int
-MC146818::drain(Event *de)
-{
- if (event.scheduled()) {
- rtcTimerInterruptTickOffset = event.when() - curTick;
- rtcClockTickOffset = event.when() - curTick;
- deschedule(event);
- }
- if (tickEvent.scheduled()) {
- deschedule(tickEvent);
- }
- return 0;
-}
-
void
MC146818::serialize(const string &base, ostream &os)
{
@@ -233,7 +214,9 @@ MC146818::serialize(const string &base, ostream &os)
// save the timer tick and rtc clock tick values to correctly reschedule
// them during unserialize
//
+ Tick rtcTimerInterruptTickOffset = event.when() - curTick;
SERIALIZE_SCALAR(rtcTimerInterruptTickOffset);
+ Tick rtcClockTickOffset = event.when() - curTick;
SERIALIZE_SCALAR(rtcClockTickOffset);
}