]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/VirtualMachineImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix build
[simgrid.git] / src / kernel / resource / VirtualMachineImpl.cpp
index 16607a03867011b85da91f751f7bfea728437865..fdb27a1de6b9dd100a39711915e46a7a3b8b4bae 100644 (file)
@@ -75,9 +75,9 @@ static void add_active_exec(s4u::Exec const& task)
   }
 }
 
-static void remove_active_exec(s4u::Activity& task)
+static void remove_active_exec(s4u::Activity const& task)
 {
-  const auto* exec = dynamic_cast<s4u::Exec*>(&task);
+  const auto* exec = dynamic_cast<s4u::Exec const*>(&task);
   if (exec == nullptr)
     return;
   if (not exec->is_assigned())
@@ -184,7 +184,7 @@ VirtualMachineImpl::VirtualMachineImpl(const std::string& name, s4u::VirtualMach
    * The value for GUESTOS_NOISE corresponds to the cost of the global action associated to the VM.  It corresponds to
    * the cost of a VM running no tasks.
    */
-  action_ = physical_host_->get_cpu()->execution_start(0, core_amount_);
+  action_ = physical_host_->get_cpu()->execution_start(0, core_amount_, 0);
 
   // It's empty for now, so it should not request resources in the PM
   update_action_weight();
@@ -205,7 +205,7 @@ void VirtualMachineImpl::vm_destroy()
   xbt_assert(ret, "Bug: some resource still remains");
 }
 
-void VirtualMachineImpl::suspend(smx_actor_t issuer)
+void VirtualMachineImpl::suspend(const actor::ActorImpl* issuer)
 {
   if (vm_state_ != s4u::VirtualMachine::State::RUNNING)
     throw VmFailureException(XBT_THROW_POINT,
@@ -253,7 +253,7 @@ void VirtualMachineImpl::resume()
  *
  * @param issuer the actor requesting the shutdown
  */
-void VirtualMachineImpl::shutdown(smx_actor_t issuer)
+void VirtualMachineImpl::shutdown(actor::ActorImpl* issuer)
 {
   if (vm_state_ != s4u::VirtualMachine::State::RUNNING)
     XBT_VERB("Shutting down the VM %s even if it's not running but in state %s", piface_->get_cname(),