+/**
+ * \brief Same as SIMIX_process_create() but with only one argument (used by timers).
+ * \return the process created
+ */
+smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
+
+ smx_process_t process;
+
+ if (simix_global->create_process_function) {
+ process = simix_global->create_process_function(args->name,
+ args->code,
+ args->data,
+ args->hostname,
+ args->argc,
+ args->argv,
+ args->properties);
+ }
+ else {
+ process = SIMIX_process_create(args->name,
+ args->code,
+ args->data,
+ args->hostname,
+ args->argc,
+ args->argv,
+ args->properties);
+ }
+ // FIXME: to simplify this, simix_global->create_process_function could just
+ // be SIMIX_process_create() by default (and the same thing in smx_deployment.c)
+
+ return process;
+}
+
+/**
+ * \brief Internal function to create a process.
+ *
+ * This function actually creates the process.
+ * It may be called when a REQ_PROCESS_CREATE request occurs,
+ * or directly for SIMIX internal purposes.
+ *
+ * \return the process created
+ */
+smx_process_t SIMIX_process_create(const char *name,
+ xbt_main_func_t code,
+ void *data,
+ const char *hostname,
+ int argc, char **argv,
+ xbt_dict_t properties) {
+
+ smx_process_t process = NULL;
+ smx_host_t host = SIMIX_host_get_by_name(hostname);
+
+ DEBUG2("Start process %s on host %s", name, hostname);
+
+ if (!SIMIX_host_get_state(host)) {
+ WARN2("Cannot launch process '%s' on failed host '%s'", name,
+ hostname);
+ }
+ else {
+ process = xbt_new0(s_smx_process_t, 1);
+
+ xbt_assert0(((code != NULL) && (host != NULL)), "Invalid parameters");
+
+ /* Process data */
+ process->pid = simix_process_count++;
+ process->name = xbt_strdup(name);
+ process->smx_host = host;
+ process->data = data;
+
+ VERB1("Create context %s", process->name);
+ process->context = SIMIX_context_new(code, argc, argv,
+ simix_global->cleanup_process_function, process);