systemc: Implement Object::simcontext().
authorGabe Black <gabeblack@google.com>
Thu, 11 Oct 2018 02:20:49 +0000 (19:20 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 01:18:07 +0000 (01:18 +0000)
Implement it as a nonstandard alias for the also non-standard
sc_get_curr_simcontext.

Change-Id: Ic9a51efa93f687e4b57d622247a5510136fab221
Reviewed-on: https://gem5-review.googlesource.com/c/13397
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/object.cc

index 55ea7e6d7010ad715b86bd300afa95d281500f3d..e67aa167c6985db4e503f8517afe2e55f37002e6 100644 (file)
@@ -38,6 +38,7 @@
 #include "systemc/core/scheduler.hh"
 #include "systemc/ext/core/messages.hh"
 #include "systemc/ext/core/sc_module.hh"
+#include "systemc/ext/core/sc_simcontext.hh"
 
 namespace sc_gem5
 {
@@ -243,8 +244,7 @@ Object::attr_cltn() const
 sc_core::sc_simcontext *
 Object::simcontext() const
 {
-    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
-    return nullptr;
+    return sc_core::sc_get_curr_simcontext();
 }
 
 EventsIt