56a57,58
> clear();
> }
57a60,62
> void
> Scheduler::clear()
> {
60a66
> deltas.clear();
63,64c69,71
< for (auto &ts: timeSlots) {
< for (auto &e: ts.second->events)
---
> for (auto &tsp: timeSlots) {
> TimeSlot *&ts = tsp.second;
> for (auto &e: ts->events)
66,67c73
< delete ts.second;
< ts.second = nullptr;
---
> eq->deschedule(ts);
68a75
> timeSlots.clear();
276,277c283
< if (readyEvent.scheduled())
< eq->deschedule(&readyEvent);
---
> clear();
341,351c347,349
< // If we're not supposed to finish the delta cycle, flush the list
< // of ready processes, scheduled updates, and delta notifications.
< Process *p;
< while ((p = readyList.getNext()))
< p->popListNode();
< Channel *c;
< while ((c = updateList.getNext()))
< c->popListNode();
< for (auto &e: deltas)
< e->deschedule();
< deltas.clear();
---
> // If we're not supposed to finish the delta cycle, flush all
> // pending activity.
> clear();