X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ac6b411512330530569fadb8c3f4fb82a4c70440..f159a7002798e65df6c90c3b9f774f48920aa41b:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 4be4445e2f..475e236447 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -245,6 +245,20 @@ int Cpu::getCore() return m_core; } +void Cpu::set_state_trace(tmgr_trace_t trace) +{ + xbt_assert(p_stateEvent==NULL,"Cannot set a second state trace to Host %s", m_host->name().c_str()); + + p_stateEvent = future_evt_set->add_trace(trace, 0.0, this); +} +void Cpu::set_speed_trace(tmgr_trace_t trace) +{ + xbt_assert(p_speedEvent==NULL,"Cannot set a second speed trace to Host %s", m_host->name().c_str()); + + p_speedEvent = future_evt_set->add_trace(trace, 0.0, this); +} + + /********** * Action * **********/ @@ -345,12 +359,12 @@ void CpuAction::setAffinity(Cpu *cpu, unsigned long mask) XBT_OUT(); } -simgrid::xbt::signal CpuAction::onStateChange; +simgrid::xbt::signal CpuAction::onStateChange; void CpuAction::setState(e_surf_action_state_t state){ - e_surf_action_state_t old = getState(); + e_surf_action_state_t previous = getState(); Action::setState(state); - onStateChange(this, old, state); + onStateChange(this, previous); } }