-
- DEBUG3("Process %s(%s) will be started at time %f", arg->name,
- arg->hostname,start_time);
- if (simix_global->create_process_function)
- surf_timer_resource->extension_public->set(start_time, (void*) simix_global->create_process_function, arg);
- else
- surf_timer_resource->extension_public->set(start_time, (void*) &SIMIX_process_create_with_arguments, arg);
-
- }
- if((start_time<0) || (start_time==SIMIX_get_clock())) {
- DEBUG2("Starting Process %s(%s) right now", parse_argv[0],
- parse_host);
- if (simix_global->create_process_function)
- process = simix_global->create_process_function(parse_argv[0], parse_code, NULL, parse_host, parse_argc,parse_argv);
- else
- process = SIMIX_process_create_with_arguments(parse_argv[0], parse_code, NULL, parse_host, parse_argc,parse_argv, NULL);
-
- if(kill_time > SIMIX_get_clock()) {
- if (simix_global->kill_process_function)
- surf_timer_resource->extension_public->set(start_time, (void*) simix_global->kill_process_function, arg);
- else
- surf_timer_resource->extension_public->set(kill_time, (void*) &SIMIX_process_kill, (void*) process);
+ arg->properties = current_property_set;
+
+ XBT_DEBUG("Process %s(%s) will be started at time %f", arg->name,
+ arg->hostname, start_time);
+ SIMIX_timer_set(start_time, &SIMIX_process_create_from_wrapper, arg);
+ } else { // start_time <= SIMIX_get_clock()
+ XBT_DEBUG("Starting Process %s(%s) right now", parse_argv[0], parse_host);
+
+ if (simix_global->create_process_function)
+ (*simix_global->create_process_function) (&process,
+ parse_argv[0],
+ parse_code, NULL,
+ parse_host, parse_argc,
+ parse_argv,
+ current_property_set);
+ else
+ SIMIX_req_process_create(&process, parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,
+ current_property_set);
+ /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
+ if (!process) {
+ xbt_free(parse_host);
+ return;