+void __MSG_process_cleanup(void *arg)
+{
+ /* arg is a pointer to a simix process, we can get the msg process with the field data */
+ m_process_t proc = ((smx_process_t) arg)->data;
+#ifdef HAVE_TRACING
+ TRACE_msg_process_end(proc);
+#endif
+ xbt_fifo_remove(msg_global->process_list, proc);
+ SIMIX_process_cleanup(arg);
+ if (proc->name) {
+ free(proc->name);
+ proc->name = NULL;
+ }
+ if (proc->simdata) {
+ free(proc->simdata);
+ proc->simdata = NULL;
+ }
+ free(proc);
+
+ return;
+}
+
+/* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
+void *_MSG_process_create_from_SIMIX(const char *name,
+ xbt_main_func_t code, void *data,
+ char *hostname, int argc, char **argv,
+ xbt_dict_t properties)
+{
+ m_host_t host = MSG_get_host_by_name(hostname);
+ return (void *) MSG_process_create_with_environment(name, code, data,
+ host, argc, argv,
+ properties);
+}
+
+/** \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);
+}
+