Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/54323 )

Change subject: systemc: Eliminate the unused PythonReadyFunc mechanism.
......................................................................

systemc: Eliminate the unused PythonReadyFunc mechanism.

Change-Id: I8892e4d209901454f2ab923aa3fa9932d7963274
---
M src/systemc/core/SystemC.py
M src/systemc/core/python.cc
M src/systemc/core/python.hh
3 files changed, 9 insertions(+), 37 deletions(-)



diff --git a/src/systemc/core/SystemC.py b/src/systemc/core/SystemC.py
index 6828175..592b950 100644
--- a/src/systemc/core/SystemC.py
+++ b/src/systemc/core/SystemC.py
@@ -63,11 +63,3 @@
     @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()
diff --git a/src/systemc/core/python.cc b/src/systemc/core/python.cc
index 8f2d56b..2283ae7 100644
--- a/src/systemc/core/python.cc
+++ b/src/systemc/core/python.cc
@@ -38,13 +38,6 @@
 namespace
 {

-PythonReadyFunc *&
-firstReadyFunc()
-{
-    static PythonReadyFunc *first = nullptr;
-    return first;
-}
-
 PythonInitFunc *&
 firstInitFunc()
 {
@@ -53,17 +46,9 @@
 }

 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 @@

 } // anonymous namespace

-PythonReadyFunc::PythonReadyFunc() : next(firstReadyFunc())
-{
-    firstReadyFunc() = this;
-}
-
 PythonInitFunc::PythonInitFunc() : next(firstInitFunc())
 {
     firstInitFunc() = this;
diff --git a/src/systemc/core/python.hh b/src/systemc/core/python.hh
index 61c9c80..5a3f6ef 100644
--- a/src/systemc/core/python.hh
+++ b/src/systemc/core/python.hh
@@ -33,15 +33,6 @@
 namespace sc_gem5
 {

-struct PythonReadyFunc
-{
-    PythonReadyFunc *next;
-
-    PythonReadyFunc();
-    ~PythonReadyFunc() {}
-    virtual void run() = 0;
-};
-
 struct PythonInitFunc
 {
     PythonInitFunc *next;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/54323
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-2
Gerrit-Change-Id: I8892e4d209901454f2ab923aa3fa9932d7963274
Gerrit-Change-Number: 54323
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to