X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/55311bd63d3b77f71f141b26eca381941ec3da15..42a5c2c5fa27026391c465eb71f8c6486b6af403:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 5bfa669fe3..e1971f0ad1 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -592,13 +592,11 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) arg->name = std::string(process->argv[0]); arg->code = code; arg->data = nullptr; - arg->hostname = sg_host_get_name(host); + arg->host = 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()) { @@ -606,18 +604,18 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) arg->name = std::string(process->argv[0]); arg->code = std::move(code); arg->data = nullptr; - arg->hostname = sg_host_get_name(host); + arg->host = host; arg->kill_time = kill_time; arg->properties = current_property_set; - XBT_DEBUG("Process %s(%s) will be started at time %f", - arg->name.c_str(), arg->hostname, start_time); + XBT_DEBUG("Process %s@%s will be started at time %f", + arg->name.c_str(), arg->host->name().c_str(), start_time); SIMIX_timer_set(start_time, [=]() { simix_global->create_process_function( arg->name.c_str(), std::move(arg->code), arg->data, - arg->hostname, + arg->host, arg->kill_time, arg->properties, arg->auto_restart, @@ -630,7 +628,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) process_created = simix_global->create_process_function( arg->name.c_str(), std::move(code), nullptr, - sg_host_get_name(host), kill_time, + 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) */