Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv VM shutdown to the plugin
[simgrid.git] / src / plugins / vm / s4u_VirtualMachine.cpp
index 8bda7e7..3ee05b2 100644 (file)
@@ -104,6 +104,12 @@ void VirtualMachine::resume()
   pimpl_vm_->resume();
 }
 
+void VirtualMachine::shutdown()
+{
+  smx_actor_t issuer = SIMIX_process_self();
+  simgrid::simix::kernelImmediate([this, issuer]() { pimpl_vm_->shutdown(issuer); });
+}
+
 bool VirtualMachine::isMigrating()
 {
   return pimpl_vm_ && pimpl_vm_->isMigrating;