X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e8c861edf6ed4761a4780c12852a28e540d9fdc4..dccf1b41e9c7b5a696f01abceaa2779fe65f154f:/src/simix/libsmx.cpp?ds=sidebyside diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index a3bf0a9aa6..7ccc835004 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -175,29 +175,6 @@ e_smx_state_t simcall_execution_wait(smx_activity_t execution) return (e_smx_state_t) simcall_BODY_execution_wait(execution); } -/** - * \ingroup simix_vm_management - * \brief Start the given VM to the given physical host - * - * \param vm VM - */ -void simcall_vm_start(sg_host_t vm) -{ - simgrid::simix::kernelImmediate(std::bind(SIMIX_vm_start, vm)); -} - -/** - * @brief Function to set the CPU bound of the given SIMIX VM host. - * - * @param host the vm host (a sg_host_t) - * @param bound bound (a double) - */ -void simcall_vm_set_bound(sg_host_t vm, double bound) -{ - simgrid::simix::kernelImmediate( - [vm, bound]() { static_cast(vm)->pimpl_vm_->setBound(bound); }); -} - /** * \ingroup simix_vm_management * \brief Suspend the given VM @@ -231,33 +208,6 @@ void simcall_vm_save(sg_host_t vm) simcall_BODY_vm_save(vm); } -/** - * \ingroup simix_vm_management - * \brief Restore the given VM - * - * \param vm VM - */ -void simcall_vm_restore(sg_host_t vm) -{ - simgrid::simix::kernelImmediate([vm]() { - if (static_cast(vm)->pimpl_vm_->getState() != SURF_VM_STATE_SAVED) - THROWF(vm_error, 0, "VM(%s) was not saved", vm->name().c_str()); - - XBT_DEBUG("restore VM(%s), where %d processes exist", vm->name().c_str(), - xbt_swag_size(sg_host_simix(vm)->process_list)); - - /* jump to vm_ws_restore() */ - static_cast(vm)->pimpl_vm_->restore(); - - smx_actor_t smx_process, smx_process_safe; - xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) - { - XBT_DEBUG("resume %s", smx_process->name.c_str()); - SIMIX_process_resume(smx_process); - } - }); -} - /** * \ingroup simix_vm_management * \brief Shutdown the given VM @@ -392,8 +342,7 @@ void simcall_process_set_kill_time(smx_actor_t process, double kill_time) if (kill_time <= SIMIX_get_clock() || simix_global->kill_process_function == nullptr) return; - XBT_DEBUG("Set kill time %f for process %s(%s)", - kill_time, process->name.c_str(), sg_host_get_name(process->host)); + XBT_DEBUG("Set kill time %f for process %s@%s", kill_time, process->cname(), process->host->cname()); process->kill_timer = SIMIX_timer_set(kill_time, [=] { simix_global->kill_process_function(process); process->kill_timer=nullptr;