SIMIX_process_kill(process, issuer);
//start the new process
- if (simix_global->create_process_function)
- return simix_global->create_process_function(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname,
- arg.kill_time, arg.properties, arg.auto_restart, nullptr);
- else
- return simcall_process_create(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname, arg.kill_time,
- arg.properties, arg.auto_restart);
+ return simix_global->create_process_function(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname,
+ arg.kill_time, arg.properties, arg.auto_restart, nullptr);
}
void SIMIX_segment_index_set(smx_actor_t proc, int index){
smx_process_arg_t arg;
xbt_dynar_foreach(boot_processes,cpt,arg) {
XBT_DEBUG("Booting Process %s(%s) right now", arg->name.c_str(), arg->hostname);
- // FIXME: factorize this code by registering the simcall as default function
- if (simix_global->create_process_function) {
- simix_global->create_process_function(arg->name.c_str(),
- arg->code,
- nullptr,
- arg->hostname,
- arg->kill_time,
- arg->properties,
- arg->auto_restart,
- nullptr);
- } else {
- simcall_process_create(arg->name.c_str(),
- arg->code,
- nullptr,
- arg->hostname,
- arg->kill_time,
- arg->properties,
- arg->auto_restart);
- }
+ simix_global->create_process_function(arg->name.c_str(),
+ arg->code,
+ nullptr,
+ arg->hostname,
+ arg->kill_time,
+ arg->properties,
+ arg->auto_restart,
+ nullptr);
}
}
xbt_dynar_foreach (process_list, cpt, arg) {
XBT_DEBUG("Restarting Process %s(%s) right now", arg->name.c_str(), arg->hostname);
- if (simix_global->create_process_function) {
- simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time,
- arg->properties, arg->auto_restart, nullptr);
- } else {
- simcall_process_create(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time, arg->properties,
- arg->auto_restart);
- }
+ simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time,
+ arg->properties, arg->auto_restart, nullptr);
}
xbt_dynar_reset(process_list);
}
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) {