systemc: Don't depend on the order of static initializers.
STL containers may need to be constructed before they're used. Don't count on being able to insert into them during a static initializer. Change-Id: Icb05d5084a470e1ebd976ae6e1954b1a78aabd6a Reviewed-on: https://gem5-review.googlesource.com/c/13329 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -37,6 +37,8 @@ namespace sc_gem5
|
||||
|
||||
struct PythonReadyFunc
|
||||
{
|
||||
PythonReadyFunc *next;
|
||||
|
||||
PythonReadyFunc();
|
||||
~PythonReadyFunc() {}
|
||||
virtual void run() = 0;
|
||||
@@ -44,6 +46,8 @@ struct PythonReadyFunc
|
||||
|
||||
struct PythonInitFunc
|
||||
{
|
||||
PythonInitFunc *next;
|
||||
|
||||
PythonInitFunc();
|
||||
~PythonInitFunc() {}
|
||||
virtual void run(pybind11::module &systemc) = 0;
|
||||
|
||||
Reference in New Issue
Block a user