- smx_process_arg_t arg = NULL;
- smx_process_t process = NULL;
- if (start_time > SIMIX_get_clock()) {
- arg = xbt_new0(s_smx_process_arg_t, 1);
- arg->name = parse_argv[0];
- arg->code = parse_code;
- arg->data = NULL;
- arg->hostname = parse_host;
- arg->argc = parse_argc;
- arg->argv = parse_argv;
- arg->kill_time = kill_time;
- 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) {
- return;
- }
- if (kill_time > SIMIX_get_clock()) {
- if (simix_global->kill_process_function) {
- SIMIX_timer_set(start_time, simix_global->kill_process_function, process);
- }
- }
- }
- current_property_set = NULL;