if (!sg_host_simix(host)->auto_restart_processes) {
sg_host_simix(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg);
}
- smx_process_arg_t arg = new s_smx_process_arg_t();
+ smx_process_arg_t arg = new simgrid::simix::ProcessArg();
arg->name = name;
arg->code = code;
arg->data = data;
XBT_DEBUG("Restarting process %s on %s", process->name, sg_host_get_name(process->host));
//retrieve the arguments of the old process
//FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
- s_smx_process_arg_t arg;
+ simgrid::simix::ProcessArg arg;
arg.code = process->code;
arg.hostname = sg_host_get_name(process->host);
arg.kill_time = SIMIX_timer_get_date(process->kill_timer);
void *arg;
} s_smx_process_exit_fun_t, *smx_process_exit_fun_t;
-typedef class s_smx_process_arg {
+namespace simgrid {
+namespace simix {
+
+class ProcessArg {
public:
std::string name;
xbt_main_func_t code;
double kill_time;
xbt_dict_t properties;
unsigned auto_restart:1;
-} s_smx_process_arg_t, *smx_process_arg_t;
-
-namespace simgrid {
-namespace simix {
+};
class Process {
public:
}
}
+typedef simgrid::simix::ProcessArg *smx_process_arg_t;
+
typedef simgrid::simix::Process* smx_process_t;
SG_BEGIN_DECL()
smx_process_arg_t arg = NULL;
smx_process_t process_created = NULL;
- arg = new s_smx_process_arg_t();
+ arg = new simgrid::simix::ProcessArg();
arg->code = parse_code;
arg->data = NULL;
arg->hostname = sg_host_get_name(host);
xbt_dynar_push_as(sg_host_simix(host)->boot_processes,smx_process_arg_t,arg);
if (start_time > SIMIX_get_clock()) {
- arg = new s_smx_process_arg_t();
+ arg = new simgrid::simix::ProcessArg();
arg->name = process->argv[0];
arg->code = parse_code;
arg->data = NULL;