Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this is C++
[simgrid.git] / src / surf / vm_hl13.cpp
index e7b9a42..cf79554 100644 (file)
@@ -184,7 +184,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, xbt_dict_t props, sg_host_t hos
 
   // //// CPU  RELATED STUFF ////
   // Roughly, create a vcpu resource by using the values of the sub_cpu one.
-  CpuCas01 *sub_cpu = static_cast<CpuCas01*>(sg_host_surfcpu(host_PM));
+  CpuCas01 *sub_cpu = static_cast<CpuCas01*>(host_PM->p_cpu);
 
   p_cpu = surf_cpu_model_vm->createCpu(host, // the machine hosting the VM
       sub_cpu->getSpeedPeakList(),        // host->power_peak,
@@ -293,8 +293,7 @@ void VMHL13::migrate(sg_host_t host_dest)
    /* Update vcpu's action for the new pm */
    {
      /* create a cpu action bound to the pm model at the destination. */
-     CpuAction *new_cpu_action = static_cast<CpuAction*>(
-                                           static_cast<Cpu*>(sg_host_surfcpu(host_dest))->execute(0));
+     CpuAction *new_cpu_action = static_cast<CpuAction*>(host_dest->p_cpu->execute(0));
 
      e_surf_action_state_t state = p_action->getState();
      if (state != SURF_ACTION_DONE)