X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1b75ebf09b4d1b81533d140a9437efffeb9e6a0c..65ad88b71f10717fb542633b394035ff2e53e308:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index ce4449a540..dfcb753bdc 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -89,7 +89,7 @@ static std::vector *explodesRadical(const char*radicals){ /** The current AS in the parsing */ static simgrid::kernel::routing::AsImpl *current_routing = nullptr; -static simgrid::kernel::routing::AsImpl* routing_get_current() +static simgrid::kernel::routing::AsImpl *routing_get_current() { return current_routing; } @@ -595,10 +595,8 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) arg->hostname = sg_host_get_name(host); arg->kill_time = kill_time; arg->properties = current_property_set; - if (!sg_host_simix(host)->boot_processes) - sg_host_simix(host)->boot_processes = xbt_dynar_new(sizeof(smx_process_arg_t), _SIMIX_host_free_process_arg); - xbt_dynar_push_as(sg_host_simix(host)->boot_processes,smx_process_arg_t,arg); + sg_host_simix(host)->boot_processes.push_back(arg); if (start_time > SIMIX_get_clock()) { @@ -628,15 +626,10 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) XBT_DEBUG("Starting Process %s(%s) right now", arg->name.c_str(), sg_host_get_name(host)); - if (simix_global->create_process_function) - process_created = simix_global->create_process_function( - arg->name.c_str(), std::move(code), nullptr, - sg_host_get_name(host), kill_time, - current_property_set, auto_restart, nullptr); - else - process_created = simcall_process_create( - arg->name.c_str(), std::move(code), nullptr, sg_host_get_name(host), kill_time, - current_property_set,auto_restart); + process_created = simix_global->create_process_function( + arg->name.c_str(), std::move(code), nullptr, + sg_host_get_name(host), kill_time, + current_property_set, auto_restart, nullptr); /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */ if (!process_created) {