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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user