summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-11 16:16:49 -0700
committerGabe Black <gabeblack@google.com>2018-10-09 21:48:14 +0000
commitf7a2c41be0e94a308da30c685a88006a763bb93f (patch)
tree5f70c216fb1ae7f99a99b54e806093e8131a47d1 /src/systemc/core/scheduler.hh
parent1f23ce702a4776318e592f101bd94d5127bb7ba9 (diff)
downloadgem5-f7a2c41be0e94a308da30c685a88006a763bb93f.tar.xz
systemc: Add some error checks to some classes.
These check whether those classes are being constructed in legal circumstances, and avoids a null pointer dereference. Change-Id: Ied36ee15c3d7bf6ee444351a841c38576780298e Reviewed-on: https://gem5-review.googlesource.com/c/12622 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.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index 0bbc3dac6..33515ea43 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -338,6 +338,9 @@ class Scheduler
StatusStopped
};
+ bool elaborationDone() { return _elaborationDone; }
+ void elaborationDone(bool b) { _elaborationDone = b; }
+
bool paused() { return status() == StatusPaused; }
bool stopped() { return status() == StatusStopped; }
bool inDelta() { return status() == StatusDelta; }
@@ -410,6 +413,7 @@ class Scheduler
EventWrapper<Scheduler, &Scheduler::pause> starvationEvent;
void scheduleStarvationEvent();
+ bool _elaborationDone;
bool _started;
bool _stopNow;