summaryrefslogtreecommitdiff
path: root/src/systemc/core/module.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-08 02:03:30 -0700
committerGabe Black <gabeblack@google.com>2018-09-20 01:43:26 +0000
commit081af5ec9c6dff33081ccd00f4ec1d494fa6af3c (patch)
tree8c131f6cba419bb711f5b034212e865ea590d7fb /src/systemc/core/module.hh
parentde45562a8abae66ada57a3fc06078fadbd9f625b (diff)
downloadgem5-081af5ec9c6dff33081ccd00f4ec1d494fa6af3c.tar.xz
systemc: Use an std::list to track all modules.
This is less efficient when modules are destroyed since the list isn't sorted, and each module needs to find its own entry to remove. The benefit is that entries added to the end of the list while the list is being iterated over will still be included, and that the order the modules are added will be preserved so that it matches what the order in the regression tests. Change-Id: I5af5d15f316fa58561e8fd9ca77f667ddc8b2c5e Reviewed-on: https://gem5-review.googlesource.com/12077 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/module.hh')
-rw-r--r--src/systemc/core/module.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemc/core/module.hh b/src/systemc/core/module.hh
index 7e54e29d5..a5bf92975 100644
--- a/src/systemc/core/module.hh
+++ b/src/systemc/core/module.hh
@@ -31,8 +31,8 @@
#define __SYSTEMC_CORE_MODULE_HH__
#include <cassert>
+#include <list>
#include <map>
-#include <set>
#include <sstream>
#include <string>
@@ -109,7 +109,7 @@ Module *newModule();
void callbackModule(Module *m);
Module *callbackModule();
-extern std::set<Module *> allModules;
+extern std::list<Module *> allModules;
} // namespace sc_gem5