X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9ba3bfdef0f13d77474c16059ca813b75ade43ab..01f0c436719fd79cf75643e254bc04011bcdcce8:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 2f1f7df542..f9f6a12ea5 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -22,7 +22,7 @@ namespace surf { simgrid::xbt::Extension Cpu::EXTENSION_ID; -void Cpu::init() +void Cpu::classInit() { if (!EXTENSION_ID.valid()) EXTENSION_ID = simgrid::Host::extension_create(); @@ -38,10 +38,8 @@ Cpu *getActionCpu(CpuAction *action) { action->getVariable(), 0))); } -simgrid::surf::signal cpuCreatedCallbacks; -simgrid::surf::signal cpuDestructedCallbacks; -simgrid::surf::signal cpuStateChangedCallbacks; simgrid::surf::signal cpuActionStateChangedCallbacks; + void cpu_add_traces(){ surf_cpu_model_pm->addTraces(); } @@ -191,15 +189,8 @@ Cpu::Cpu(Model *model, const char *name, : Cpu(model, name, core, speedPeak, speedScale, SURF_RESOURCE_ON) {} -void Cpu::onDie() -{ - cpuDestructedCallbacks(this); - Resource::onDie(); -} - Cpu::~Cpu() { - this->die(); if (p_constraintCoreId){ for (int i = 0; i < m_core; i++) { xbt_free(p_constraintCoreId[i]); @@ -231,22 +222,12 @@ int Cpu::getCore() return m_core; } -void Cpu::setState(e_surf_resource_state_t state) -{ - e_surf_resource_state_t old = Resource::getState(); - Resource::setState(state); - cpuStateChangedCallbacks(this, old, state); -} - void Cpu::plug(simgrid::Host* host) { if (this->m_host != nullptr) xbt_die("Already plugged into host %s", host->id().c_str()); host->extension_set(this); this->m_host = host; - simgrid::surf::cpuCreatedCallbacks(this); - simgrid::surf::cpuStateChangedCallbacks(this, - SURF_RESOURCE_ON, this->getState()); } /**********