systemc: Implement Object::simcontext().
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>
diff --git a/src/systemc/core/object.cc b/src/systemc/core/object.cc
index 55ea7e6..e67aa16 100644
--- a/src/systemc/core/object.cc
+++ b/src/systemc/core/object.cc
@@ -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 @@
sc_core::sc_simcontext *
Object::simcontext() const
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
- return nullptr;
+ return sc_core::sc_get_curr_simcontext();
}
EventsIt