Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill the types xbt_context_function_t, smx_process_code_t and m_process_code_t; use...
[simgrid.git] / src / include / simix / simix.h
index ebb2c8e..4fefabb 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "xbt/misc.h"
 #include "xbt/fifo.h"
+#include "xbt/function_types.h"
 #include "simix/datatypes.h"
 #include "surf/surf.h"
 
@@ -21,8 +22,8 @@ SG_BEGIN_DECL()
 XBT_PUBLIC(void) SIMIX_config(const char *name, va_list pa);
 XBT_PUBLIC(void) SIMIX_global_init(int *argc, char **argv);
 XBT_PUBLIC(void) SIMIX_clean(void);
-XBT_PUBLIC(void) SIMIX_function_register(const char *name, smx_process_code_t code);
-XBT_PUBLIC(smx_process_code_t) SIMIX_get_registered_function(const char *name);
+XBT_PUBLIC(void) SIMIX_function_register(const char *name, xbt_main_func_t code);
+XBT_PUBLIC(xbt_main_func_t) SIMIX_get_registered_function(const char *name);
 
 XBT_PUBLIC(void) SIMIX_launch_application(const char *file);
 
@@ -38,7 +39,7 @@ XBT_PUBLIC(void) __SIMIX_main(void);
 
 /* User create and kill process, the function must accept the folling parameters:
  * const char *name: a name for the object. It is for user-level information and can be NULL
- * smx_process_code_t code: is a function describing the behavior of the agent
+ * xbt_main_func_t code: is a function describing the behavior of the agent
  * void *data: data a pointer to any data one may want to attach to the new object.
  * smx_host_t host: the location where the new agent is executed
  * int argc, char **argv: parameters passed to code
@@ -68,13 +69,16 @@ XBT_PUBLIC(int) SIMIX_host_get_state(smx_host_t host);
 
 /************************** Process handling *********************************/
 XBT_PUBLIC(smx_process_t) SIMIX_process_create(const char *name,
-                                             smx_process_code_t code, void *data,
-                                             const char * hostname, int argc, char **argv, void * clean_process_function);
+                                              xbt_main_func_t code, void *data,
+                                              const char * hostname, int argc, char **argv,
+                                              void * clean_process_function);
 
-XBT_PUBLIC(smx_process_t) SIMIX_jprocess_create(const char *name, 
-                                               smx_host_t host,
-                                               void *data,
-                                               void *jprocess, void *jenv);
+XBT_PUBLIC(void) SIMIX_jprocess_create(const char *name, 
+                                      smx_host_t host,
+                                      void *data,
+                                      void *jprocess, void *jenv,
+                                      void * clean_process_function,
+                                      smx_process_t* res);
 
 XBT_PUBLIC(void) SIMIX_process_kill(smx_process_t process);
 XBT_PUBLIC(void) SIMIX_process_cleanup(void *arg);
@@ -135,6 +139,8 @@ XBT_PUBLIC(smx_action_t) SIMIX_action_parallel_execute(char * name,
                                                       double amount,
                                                       double rate);
 
+void SIMIX_display_process_status(void);
+
 /* Helper functions for jMSG: manipulate the context data without breaking the module separation */
 void  SIMIX_process_set_jprocess(smx_process_t process, void *jp);
 void* SIMIX_process_get_jprocess(smx_process_t process);