summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-26 15:34:31 -0700
committerGabe Black <gabeblack@google.com>2018-09-26 00:02:52 +0000
commit9b6119a6a31f8597eebdc8bb469fd9f407ffa5e4 (patch)
treec23a05e787a4195f832577eefb8f968b1efdfe3c /src/systemc/core/scheduler.hh
parent1712dd596bb70ab12a0f07737b496107f91a06c5 (diff)
downloadgem5-9b6119a6a31f8597eebdc8bb469fd9f407ffa5e4.tar.xz
systemc: Fix some issues with starvation checks.
Make sure we check for starvation after timed notifications and at the very end of delta cycles (after delta notifications, not before). Also reverse the order of starvation checks (whether they apply at all, then if they're satisfied) to make those checks faster. Checking a bool is a lot easier than checking if a bunch of other structures are empty. Change-Id: I514ff219909823f1f424fde69856d6b510655188 Reviewed-on: https://gem5-review.googlesource.com/12268 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/scheduler.hh')
-rw-r--r--src/systemc/core/scheduler.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index 3068a0aaa..ff8434bef 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -266,6 +266,8 @@ class Scheduler
{
assert(ts == timeSlots.begin()->second);
timeSlots.erase(timeSlots.begin());
+ if (!runToTime && starved())
+ scheduleStarvationEvent();
}
// Pending activity ignores gem5 activity, much like how a systemc