summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-07-19 17:32:34 -0700
committerGabe Black <gabeblack@google.com>2018-09-11 21:41:55 +0000
commit8b8b75092a2ef84a98132518e5da55e559e942f7 (patch)
tree89ffda0f1fc4b46dc792448181e85cf68bb3c04c /src/systemc/core/scheduler.cc
parentbc46b4ac03849706c32a8d6a3383d56373983eab (diff)
downloadgem5-8b8b75092a2ef84a98132518e5da55e559e942f7.tar.xz
systemc: Handle event notifications scheduled before sc_start.
After sc_start is called, gem5 has run far enough to have an event queue to schedule the notification events on. Before then, it's still legal to request a timed notification. The scheduler should keep track of those requests, and once an event queue is available it should add them to it. Change-Id: Ie7445b1f2e616f4bd36044a09dbef9e1d12d7350 Reviewed-on: https://gem5-review.googlesource.com/12036 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/scheduler.cc')
-rw-r--r--src/systemc/core/scheduler.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index 6bb67d136..5174627d0 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -60,6 +60,10 @@ Scheduler::prepareForInit()
p->ready();
}
+ for (auto ets: eventsToSchedule)
+ eq->schedule(ets.first, ets.second);
+ eventsToSchedule.clear();
+
if (_started)
eq->schedule(&maxTickEvent, maxTick);