+void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
+{
+ simdata_process_t msg_proc;
+
+ if (smx_proc == SIMIX_process_self()) {
+ /* avoid a SIMIX request if this function is called by the process itself */
+ msg_proc = SIMIX_process_self_get_data();
+ }
+ else {
+ msg_proc = SIMIX_req_process_get_data(smx_proc);
+ }
+
+#ifdef HAVE_TRACING
+ TRACE_msg_process_end(smx_proc);
+#endif
+
+ xbt_free(msg_proc);
+}
+
+/* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
+void MSG_process_create_from_SIMIX(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)
+{
+ m_host_t host = MSG_get_host_by_name(hostname);
+ m_process_t p = MSG_process_create_with_environment(name, code, data,
+ host, argc, argv,
+ properties);
+ *((m_process_t*) process) = p;
+}
+
+/** \ingroup m_process_management
+ * \brief Creates and runs a new #m_process_t.
+ *
+ * Does exactly the same as #MSG_process_create_with_arguments but without
+ providing standard arguments (\a argc, \a argv, \a start_time, \a kill_time).
+ * \sa MSG_process_create_with_arguments
+ */
+m_process_t MSG_process_create(const char *name,
+ xbt_main_func_t code, void *data,
+ m_host_t host)
+{
+ return MSG_process_create_with_environment(name, code, data, host, -1,
+ NULL, NULL);
+}
+