summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-07-23 19:39:52 -0700
committerGabe Black <gabeblack@google.com>2018-09-11 21:47:29 +0000
commit802efef3c40a028b0048bc4b8985dcc9bf64322f (patch)
tree83c30d08427e29f0302d4c8f97b15166b14b32f4
parente27712b2d956d3a16372e5287b208335d7574684 (diff)
downloadgem5-802efef3c40a028b0048bc4b8985dcc9bf64322f.tar.xz
systemc: Ignore direct requests to mark a process as ready.
That might happen when a process is being marked as ready at the start of simulation. Because the process might not end up on the ready list, displacing it from the init list, excplicitly pop it off the init list as well. Change-Id: Iebf972e3e1baedec17b9b99b4da9dd44cd8e6957 Reviewed-on: https://gem5-review.googlesource.com/12047 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r--src/systemc/core/process.cc2
-rw-r--r--src/systemc/core/scheduler.cc1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc
index ec5c57cb9..39ee9e051 100644
--- a/src/systemc/core/process.cc
+++ b/src/systemc/core/process.cc
@@ -325,6 +325,8 @@ Process::satisfySensitivity(Sensitivity *s)
void
Process::ready()
{
+ if (disabled())
+ return;
if (suspended())
_suspendedReady = true;
else
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index 085602d7b..7d2e9ef88 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -59,6 +59,7 @@ Scheduler::prepareForInit()
for (Process *p = initList.getNext(); p; p = initList.getNext()) {
p->finalize();
+ p->popListNode();
p->ready();
}