Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/42588 )
Change subject: sim,systemc: Use slightly non-standard constructors for
custom create()
......................................................................
sim,systemc: Use slightly non-standard constructors for custom create()
Rather than rely on the default create() method being a weak symbol, we
can just not have a compliant constructor signature which means we need
to (and therefore can) define our own custom create().
Change-Id: I6009d72db0c103b5724d1ba7e20c0bd4a2b761e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42588
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Earl Ou <[email protected]>
---
M src/sim/root.cc
M src/sim/root.hh
M src/systemc/core/kernel.cc
M src/systemc/core/kernel.hh
4 files changed, 8 insertions(+), 6 deletions(-)
Approvals:
Earl Ou: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/sim/root.cc b/src/sim/root.cc
index 57212b2..35afe70 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -166,7 +166,7 @@
timeSyncEnable(en);
}
-Root::Root(const RootParams &p)
+Root::Root(const RootParams &p, int)
: SimObject(p), _enabled(false), _periodTick(p.time_sync_period),
syncEvent([this]{ timeSync(); }, name())
{
@@ -216,5 +216,5 @@
FullSystem = full_system;
FullSystemInt = full_system ? 1 : 0;
- return new Root(*this);
+ return new Root(*this, 0);
}
diff --git a/src/sim/root.hh b/src/sim/root.hh
index e2c58fd..fd3b97d 100644
--- a/src/sim/root.hh
+++ b/src/sim/root.hh
@@ -134,7 +134,9 @@
PARAMS(Root);
- Root(const Params &p);
+ // The int parameter is ignored, it's just so we can define a custom
+ // create() method.
+ Root(const Params &p, int);
/** Schedule the timesync event at startup().
*/
diff --git a/src/systemc/core/kernel.cc b/src/systemc/core/kernel.cc
index 75e5bc9..3bb27f2 100644
--- a/src/systemc/core/kernel.cc
+++ b/src/systemc/core/kernel.cc
@@ -54,7 +54,7 @@
sc_core::sc_status Kernel::status() { return _status; }
void Kernel::status(sc_core::sc_status s) { _status = s; }
-Kernel::Kernel(const Params ¶ms) :
+Kernel::Kernel(const Params ¶ms, int) :
SimObject(params), t0Event(this, false, EventBase::Default_Pri - 1)
{
// Install ourselves as the scheduler's event manager.
@@ -187,6 +187,6 @@
{
panic_if(sc_gem5::kernel,
"Only one systemc kernel object may be defined.\n");
- sc_gem5::kernel = new sc_gem5::Kernel(*this);
+ sc_gem5::kernel = new sc_gem5::Kernel(*this, 0);
return sc_gem5::kernel;
}
diff --git a/src/systemc/core/kernel.hh b/src/systemc/core/kernel.hh
index c58e0f1..9bea0db 100644
--- a/src/systemc/core/kernel.hh
+++ b/src/systemc/core/kernel.hh
@@ -46,7 +46,7 @@
{
public:
typedef SystemC_KernelParams Params;
- Kernel(const Params ¶ms);
+ Kernel(const Params ¶ms, int);
void init() override;
void regStats() override;
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/42588
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-0
Gerrit-Change-Id: I6009d72db0c103b5724d1ba7e20c0bd4a2b761e5
Gerrit-Change-Number: 42588
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s