surf_callback_emit(cpuStateChangedCallbacks, this, old, state);
}
+void Cpu::plug(simgrid::Host* host)
+{
+ if (this->m_host != nullptr)
+ xbt_die("Aleady plugged into host %s", host->id().c_str());
+ host->set_facet(this);
+ this->m_host = host;
+ simgrid::surf::cpuCreatedCallbacks(this);
+ simgrid::surf::cpuStateChangedCallbacks(this,
+ SURF_RESOURCE_ON, this->getState());
+}
+
/**********
* Action *
**********/