dev: (un)serialize fix for the RTC and RTC Timer Interrupt events
Restoring from a checkpoint fails if either the RTC or the RTC Timer Interrrupt event is disabled. The restored machine tried incorrectly to schedule the next event with negative offset. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
parent
bebab7f24f
commit
4bdbdd8413
1 changed files with 5 additions and 2 deletions
|
@ -127,8 +127,11 @@ MC146818::startup()
|
|||
{
|
||||
assert(!event.scheduled());
|
||||
assert(!tickEvent.scheduled());
|
||||
schedule(event, curTick() + event.offset);
|
||||
schedule(tickEvent, curTick() + tickEvent.offset);
|
||||
|
||||
if (stat_regB.pie)
|
||||
schedule(event, curTick() + event.offset);
|
||||
if (!rega_dv_disabled(stat_regA))
|
||||
schedule(tickEvent, curTick() + tickEvent.offset);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue