X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b3b8a3e821fc6fd4403ddf71cf9e2e09c03f7ce7..aa5a7febd33d50d8457f71c35f11c39bef0b64e4:/src/surf/host_ptask_L07.cpp diff --git a/src/surf/host_ptask_L07.cpp b/src/surf/host_ptask_L07.cpp index 2114c977cd..2f1006a9bb 100644 --- a/src/surf/host_ptask_L07.cpp +++ b/src/surf/host_ptask_L07.cpp @@ -327,7 +327,8 @@ Cpu *CpuL07Model::createCpu(const char *name, xbt_dynar_t powerPeak, 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; @@ -452,7 +453,7 @@ CpuL07::CpuL07(CpuL07Model *model, const char* name, xbt_dict_t props, 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"); @@ -461,7 +462,6 @@ CpuL07::CpuL07(CpuL07Model *model, const char* name, xbt_dict_t props, else p_powerEvent = NULL; - setState(state_initial); if (state_trace) p_stateEvent = tmgr_history_add_trace(history, state_trace, 0.0, 0, this); }