systemc: Eliminate the unused PythonReadyFunc mechanism.

Change-Id: I8892e4d209901454f2ab923aa3fa9932d7963274
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54323
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-12-15 23:10:03 -08:00
committed by Bobby Bruce
parent e35812f256
commit 52c04aa517
3 changed files with 0 additions and 37 deletions

View File

@@ -63,11 +63,3 @@ class SystemC_ScModule(SystemC_ScObject):
@cxxMethod(return_value_policy="reference", cxx_name="gem5_getPort")
def getPort(self, if_name, iex):
return None
try:
import _m5
except:
pass
else:
import _m5.systemc
_m5.systemc.python_ready()

View File

@@ -38,13 +38,6 @@ namespace sc_gem5
namespace
{
PythonReadyFunc *&
firstReadyFunc()
{
static PythonReadyFunc *first = nullptr;
return first;
}
PythonInitFunc *&
firstInitFunc()
{
@@ -52,18 +45,10 @@ firstInitFunc()
return first;
}
void
python_ready(pybind11::args args)
{
for (auto ptr = firstReadyFunc(); ptr; ptr = ptr->next)
ptr->run();
}
void
systemc_pybind(pybind11::module_ &m_internal)
{
pybind11::module_ m = m_internal.def_submodule("systemc");
m.def("python_ready", &python_ready);
for (auto ptr = firstInitFunc(); ptr; ptr = ptr->next)
ptr->run(m);
}
@@ -71,11 +56,6 @@ gem5::EmbeddedPyBind embed_("systemc", &systemc_pybind);
} // anonymous namespace
PythonReadyFunc::PythonReadyFunc() : next(firstReadyFunc())
{
firstReadyFunc() = this;
}
PythonInitFunc::PythonInitFunc() : next(firstInitFunc())
{
firstInitFunc() = this;

View File

@@ -33,15 +33,6 @@
namespace sc_gem5
{
struct PythonReadyFunc
{
PythonReadyFunc *next;
PythonReadyFunc();
~PythonReadyFunc() {}
virtual void run() = 0;
};
struct PythonInitFunc
{
PythonInitFunc *next;