systemc: Ignore direct requests to mark a process as ready.
authorGabe Black <gabeblack@google.com>
Tue, 24 Jul 2018 02:39:52 +0000 (19:39 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 11 Sep 2018 21:47:29 +0000 (21:47 +0000)
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>

src/systemc/core/process.cc
src/systemc/core/scheduler.cc

index ec5c57cb9180797908b3e635342f949783045f2a..39ee9e051caad45f47aaff1bea698343f110d0c1 100644 (file)
@@ -325,6 +325,8 @@ Process::satisfySensitivity(Sensitivity *s)
 void
 Process::ready()
 {
+    if (disabled())
+        return;
     if (suspended())
         _suspendedReady = true;
     else
index 085602d7b4895c2ece439543bb7c7552c4374112..7d2e9ef88003f31ac89eacc90591efc3c62ab16e 100644 (file)
@@ -59,6 +59,7 @@ Scheduler::prepareForInit()
 
     for (Process *p = initList.getNext(); p; p = initList.getNext()) {
         p->finalize();
+        p->popListNode();
         p->ready();
     }