45c45,47
< scMain(nullptr), _started(false), _paused(false), _stopped(false),
---
> scMain(nullptr),
> starvationEvent(this, false, StarvationPriority),
> _started(false), _paused(false), _stopped(false),
145a148,149
> if (starvationEvent.scheduled())
> eq->deschedule(&starvationEvent);
149a154,165
> Scheduler::scheduleStarvationEvent()
> {
> if (!starvationEvent.scheduled()) {
> panic_if(!eq, "Need to schedule starvation event, "
> "but no event manager.\n");
> eq->schedule(&starvationEvent, eq->getCurTick());
> if (readyEvent.scheduled())
> eq->deschedule(&readyEvent);
> }
> }
>
> void
164a181,183
> if (starved() && !runToTime)
> scheduleStarvationEvent();
>
204a224
> runToTime = run_to_time;
207a228,230
> if (starved() && !runToTime)
> return;
>
221a245,246
> if (starvationEvent.scheduled())
> eq->deschedule(&starvationEvent);