sim: Use ref constructor of MemberEventWrapper everywhere

Change-Id: I77989aa7318142634c771c558293138e7b1e8e51
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67657
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
Gabriel Busnot
2023-02-02 16:54:33 +00:00
committed by Gabriel B.
parent 7813e294ff
commit ba19f967d7
9 changed files with 18 additions and 18 deletions

View File

@@ -953,15 +953,15 @@ ISA::unserialize(CheckpointIn &cp)
UNSERIALIZE_SCALAR(hstick_cmp);
if (tick_cmp) {
tickCompare = new TickCompareEvent(this);
tickCompare = new TickCompareEvent(*this);
schedule(tickCompare, tick_cmp);
}
if (stick_cmp) {
sTickCompare = new STickCompareEvent(this);
sTickCompare = new STickCompareEvent(*this);
schedule(sTickCompare, stick_cmp);
}
if (hstick_cmp) {
hSTickCompare = new HSTickCompareEvent(this);
hSTickCompare = new HSTickCompareEvent(*this);
schedule(hSTickCompare, hstick_cmp);
}
}

View File

@@ -107,7 +107,7 @@ ISA::setFSReg(int miscReg, RegVal val)
case MISCREG_TICK_CMPR:
if (tickCompare == NULL)
tickCompare = new TickCompareEvent(this);
tickCompare = new TickCompareEvent(*this);
setMiscRegNoEffect(miscReg, val);
if ((tick_cmpr & ~mask(63)) && tickCompare->scheduled())
cpu->deschedule(tickCompare);
@@ -122,7 +122,7 @@ ISA::setFSReg(int miscReg, RegVal val)
case MISCREG_STICK_CMPR:
if (sTickCompare == NULL)
sTickCompare = new STickCompareEvent(this);
sTickCompare = new STickCompareEvent(*this);
setMiscRegNoEffect(miscReg, val);
if ((stick_cmpr & ~mask(63)) && sTickCompare->scheduled())
cpu->deschedule(sTickCompare);
@@ -193,7 +193,7 @@ ISA::setFSReg(int miscReg, RegVal val)
case MISCREG_HSTICK_CMPR:
if (hSTickCompare == NULL)
hSTickCompare = new HSTickCompareEvent(this);
hSTickCompare = new HSTickCompareEvent(*this);
setMiscRegNoEffect(miscReg, val);
if ((hstick_cmpr & ~mask(63)) && hSTickCompare->scheduled())
cpu->deschedule(hSTickCompare);

View File

@@ -393,7 +393,7 @@ std::map<Addr, HardBreakpoint *> hardBreakMap;
BaseRemoteGDB::BaseRemoteGDB(System *_system, int _port) :
incomingConnectionEvent(nullptr), incomingDataEvent(nullptr),
_port(_port), fd(-1), sys(_system),
connectEvent(this), disconnectEvent(this), trapEvent(this),
connectEvent(*this), disconnectEvent(*this), trapEvent(this),
singleStepEvent(*this)
{}

View File

@@ -100,7 +100,7 @@ SMMUv3::SMMUv3(const SMMUv3Params &params) :
deviceInterfaces(params.device_interfaces),
commandExecutor(name() + ".cmd_exec", *this),
regsMap(params.reg_map),
processCommandsEvent(this)
processCommandsEvent(*this)
{
fatal_if(regsMap.size() != SMMU_REG_SIZE,
"Invalid register map size: %#x different than SMMU_REG_SIZE = %#x\n",

View File

@@ -78,7 +78,7 @@ SMMUv3DeviceInterface::SMMUv3DeviceInterface(
deviceNeedsRetry(false),
atsDeviceNeedsRetry(false),
sendDeviceRetryEvent(*this),
atsSendDeviceRetryEvent(this)
atsSendDeviceRetryEvent(*this)
{}
void

View File

@@ -199,7 +199,7 @@ SMMUProcess::doBroadcastSignal(SMMUSignal &sig)
void
SMMUProcess::scheduleWakeup(Tick when)
{
auto *ep = new MemberEventWrapper<&SMMUProcess::wakeup> (this, true);
auto *ep = new MemberEventWrapper<&SMMUProcess::wakeup> (*this, true);
smmu.schedule(ep, when);
}

View File

@@ -60,7 +60,7 @@ MemSinkCtrl::MemSinkCtrl(const QoSMemSinkCtrlParams &p)
readBufferSize(p.read_buffer_size),
writeBufferSize(p.write_buffer_size), port(name() + ".port", *this),
interface(p.interface),
retryRdReq(false), retryWrReq(false), nextRequest(0), nextReqEvent(this),
retryRdReq(false), retryWrReq(false), nextRequest(0), nextReqEvent(*this),
stats(this)
{
// Resize read and write queue to allocate space

View File

@@ -56,7 +56,7 @@ void Kernel::status(sc_core::sc_status s) { _status = s; }
Kernel::Kernel(const Params &params, int) :
gem5::SimObject(params),
t0Event(this, false, gem5::EventBase::Default_Pri - 1)
t0Event(*this, false, gem5::EventBase::Default_Pri - 1)
{
// Install ourselves as the scheduler's event manager.
::sc_gem5::scheduler.setEventQueue(eventQueue());

View File

@@ -44,14 +44,14 @@ namespace sc_gem5
{
Scheduler::Scheduler() :
eq(nullptr), readyEvent(this, false, ReadyPriority),
pauseEvent(this, false, PausePriority),
stopEvent(this, false, StopPriority), _throwUp(nullptr),
starvationEvent(this, false, StarvationPriority),
eq(nullptr), readyEvent(*this, false, ReadyPriority),
pauseEvent(*this, false, PausePriority),
stopEvent(*this, false, StopPriority), _throwUp(nullptr),
starvationEvent(*this, false, StarvationPriority),
_elaborationDone(false), _started(false), _stopNow(false),
_status(StatusOther), maxTick(gem5::MaxTick),
maxTickEvent(this, false, MaxTickPriority),
timeAdvancesEvent(this, false, TimeAdvancesPriority), _numCycles(0),
maxTickEvent(*this, false, MaxTickPriority),
timeAdvancesEvent(*this, false, TimeAdvancesPriority), _numCycles(0),
_changeStamp(0), _current(nullptr), initDone(false), runToTime(true),
runOnce(false)
{}