base,sim: Move DTRACE into base/debug.hh.
[gem5.git] / src / sim / init.hh
index ecc4bc347956db8ec67d8c18708b224cff5d18bc..de4b4aac16cdd5a0bdf60b7d749553e55b874bbf 100644 (file)
@@ -36,8 +36,6 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
  */
 
 #ifndef __SIM_INIT_HH__
@@ -80,18 +78,6 @@ struct EmbeddedPython
     static int initAll();
 };
 
-struct EmbeddedSwig
-{
-    void (*initFunc)();
-
-    std::string context;
-
-    EmbeddedSwig(void (*init_func)(), const std::string& _context);
-
-    static std::list<EmbeddedSwig *> &getList();
-    static void initAll();
-};
-
 class EmbeddedPyBind
 {
   public:
@@ -102,7 +88,11 @@ class EmbeddedPyBind
     EmbeddedPyBind(const char *_name,
                    void (*init_func)(pybind11::module &));
 
+#if PY_MAJOR_VERSION >= 3
+    static PyObject *initAll();
+#else
     static void initAll();
+#endif
 
   private:
     void (*initFunc)(pybind11::module &);
@@ -117,8 +107,8 @@ class EmbeddedPyBind
     static std::map<std::string, EmbeddedPyBind *> &getMap();
 };
 
-int initM5Python();
+void registerNativeModules();
+
 int m5Main(int argc, char **argv);
-PyMODINIT_FUNC initm5(void);
 
 #endif // __SIM_INIT_HH__