/**
* Event used to call startWalkWrapper.
**/
- EventWrapper<Walker, &Walker::startWalkWrapper> startWalkWrapperEvent;
+ EventFunctionWrapper startWalkWrapperEvent;
// Functions for dealing with packets.
bool recvTimingResp(PacketPtr pkt);
funcState(this, NULL, NULL, true), tlb(NULL), sys(params->system),
masterId(sys->getMasterId(name())),
numSquashable(params->num_squash_per_cycle),
- startWalkWrapperEvent(this)
+ startWalkWrapperEvent([this]{ startWalkWrapper(); }, name())
{
}
};
* ThermalModel
*/
ThermalModel::ThermalModel(const Params *p)
- : ClockedObject(p), stepEvent(this), _step(p->step)
+ : ClockedObject(p), stepEvent([this]{ doStep(); }, name()), _step(p->step)
{
}
std::vector <ThermalNode*> eq_nodes;
/** Stepping event to update the model values */
- EventWrapper<ThermalModel, &ThermalModel::doStep> stepEvent;
+ EventFunctionWrapper stepEvent;
/** Step in seconds for thermal updates */
double _step;
timeSyncEnable(en);
}
-Root::Root(RootParams *p) : SimObject(p), _enabled(false),
- _periodTick(p->time_sync_period), syncEvent(this)
+Root::Root(RootParams *p)
+ : SimObject(p), _enabled(false), _periodTick(p->time_sync_period),
+ syncEvent([this]{ timeSync(); }, name())
{
_period.setTick(p->time_sync_period);
_spinThreshold.setTick(p->time_sync_spin_threshold);
Time lastTime;
void timeSync();
- EventWrapper<Root, &Root::timeSync> syncEvent;
- friend class EventWrapper<Root, &Root::timeSync>;
+ EventFunctionWrapper syncEvent;
public:
/**