+ DEBUG5("jprocess_create(name=%s,host=%p,data=%p,jproc=%p,jenv=%p)",
+ name, host, data, jprocess, jenv);
+ xbt_assert0(host, "Invalid parameters");
+
+ /* Process data */
+ process->name = xbt_strdup(name);
+ process->smx_host = host;
+ process->argc = 0;
+ process->argv = NULL;
+ process->mutex = NULL;
+ process->cond = NULL;
+ SIMIX_context_new(&process, jprocess);
+ process->data = data;
+
+ /* Add the process to it's host process list */
+ xbt_swag_insert(&process, host->process_list);
+
+ /* fix current_process, about which xbt_context_start mocks around */
+ self = simix_global->current_process;
+ SIMIX_context_start(process);
+ simix_global->current_process = self;
+
+ /* Now insert it in the global process list and in the process to run list */
+ xbt_swag_insert(process, simix_global->process_list);
+ DEBUG2("Inserting %s(%s) in the to_run list", process->name, host->name);
+ xbt_swag_insert(process, simix_global->process_to_run);
+}
+
+/** \brief Kill a SIMIX process
+ *
+ * This function simply kills a \a process... scarry isn't it ? :).