+void SIMIX_process_create(smx_process_t *process,
+ const char *name,
+ xbt_main_func_t code,
+ void *data,
+ const char *hostname,
+ int argc, char **argv,
+ xbt_dict_t properties) {
+
+ *process = NULL;
+ smx_host_t host = SIMIX_host_get_by_name(hostname);
+
+ XBT_DEBUG("Start process %s on host %s", name, hostname);
+
+ if (!SIMIX_host_get_state(host)) {
+ XBT_WARN("Cannot launch process '%s' on failed host '%s'", name,
+ hostname);
+ }
+ else {
+ *process = xbt_new0(s_smx_process_t, 1);
+
+ xbt_assert(((code != NULL) && (host != NULL)), "Invalid parameters");
+
+ /* Process data */
+ (*process)->pid = simix_process_maxpid++;
+ (*process)->name = xbt_strdup(name);
+ (*process)->smx_host = host;
+ (*process)->data = data;
+ (*process)->comms = xbt_fifo_new();
+ (*process)->simcall.issuer = *process;
+
+ XBT_VERB("Create context %s", (*process)->name);
+ (*process)->context = SIMIX_context_new(code, argc, argv,
+ simix_global->cleanup_process_function, *process);
+
+ (*process)->running_ctx = xbt_new(xbt_running_ctx_t, 1);
+ XBT_RUNNING_CTX_INITIALIZE((*process)->running_ctx);
+
+ /* Add properties */
+ (*process)->properties = properties;
+
+ /* Add the process to it's host process list */
+ xbt_swag_insert(*process, host->process_list);
+
+ XBT_DEBUG("Start context '%s'", (*process)->name);
+
+ /* Now insert it in the global process list and in the process to run list */
+ xbt_swag_insert(*process, simix_global->process_list);
+ XBT_DEBUG("Inserting %s(%s) in the to_run list", (*process)->name, host->name);
+ xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, *process);
+ }
+}
+
+/**
+ * \brief Executes the processes from simix_global->process_to_run.
+ *
+ * The processes of simix_global->process_to_run are run (in parallel if
+ * possible). On exit, simix_global->process_to_run is empty, and
+ * simix_global->process_that_ran contains the list of processes that just ran.
+ * The two lists are swapped so, be careful when using them before and after a
+ * call to this function.
+ */
+void SIMIX_process_runall(void)