CpuL07 *cpu = new CpuL07(this, name, cpu_properties,
power_initial, power_scale, power_trace,
core, state_initial, state_trace);
-
+ surf_callback_emit(cpuCreatedCallbacks, cpu);
+ surf_callback_emit(cpuStateChangedCallbacks, cpu, SURF_RESOURCE_ON, state_initial);
sg_host_surfcpu_set(sg_host, cpu);
return cpu;
double power_initial, double power_scale, tmgr_trace_t power_trace,
int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace)
: Cpu(model, name, props, lmm_constraint_new(ptask_maxmin_system, this, power_initial * power_scale),
- core, power_initial, power_scale)
+ core, power_initial, power_scale, state_initial)
{
xbt_assert(m_powerScale > 0, "Power has to be >0");
else
p_powerEvent = NULL;
- setState(state_initial);
if (state_trace)
p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, this);
}