summaryrefslogtreecommitdiff
path: root/src/systemc/core/sc_spawn.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-29 00:18:23 -0700
committerGabe Black <gabeblack@google.com>2018-10-03 00:15:14 +0000
commit8fdda3b2d8eb12b3c26cce8f38ce6ea4f525fa69 (patch)
tree63a6a1a854a929a0aaa12b7db62532ee83a5f85c /src/systemc/core/sc_spawn.cc
parentc599dfdfcd37934ae8756f421953ceeb37661a1f (diff)
downloadgem5-8fdda3b2d8eb12b3c26cce8f38ce6ea4f525fa69.tar.xz
systemc: Make Process track whether it's dynamic on its own.
Processes which are created in end_of_elaboration aren't created with sc_spawn but still need to figure out if they're dynamic. Rather than duplicate the check in sc_spawn, this change centralizes it in the Process class itself. Change-Id: I763d5a0fa89a72fbc82346b6ce2eed852ee72524 Reviewed-on: https://gem5-review.googlesource.com/c/12443 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_spawn.cc')
-rw-r--r--src/systemc/core/sc_spawn.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/systemc/core/sc_spawn.cc b/src/systemc/core/sc_spawn.cc
index 054feb8da..b0570a663 100644
--- a/src/systemc/core/sc_spawn.cc
+++ b/src/systemc/core/sc_spawn.cc
@@ -60,15 +60,11 @@ spawnWork(ProcessFuncWrapper *func, const char *name,
name = ::sc_core::sc_gen_unique_name("thread_p");
}
- bool dynamic =
- (::sc_core::sc_get_status() >
- ::sc_core::SC_BEFORE_END_OF_ELABORATION);
-
Process *proc;
if (method)
- proc = new Method(name, func, dynamic);
+ proc = new Method(name, func);
else
- proc = new Thread(name, func, dynamic);
+ proc = new Thread(name, func);
if (opts) {
for (auto e: opts->_events)