X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/64d2562eea7ac471385b53b55a338ab3a15fd746..a78605066e144a5398e2f4be801f4f7d3161181e:/src/simix/private.h diff --git a/src/simix/private.h b/src/simix/private.h index 1ef1e42898..bafad3ecf9 100644 --- a/src/simix/private.h +++ b/src/simix/private.h @@ -17,6 +17,7 @@ #include "xbt/dict.h" #include "xbt/context.h" #include "xbt/config.h" +#include "xbt/function_types.h" /******************************* Datatypes **********************************/ @@ -37,8 +38,9 @@ typedef struct SIMIX_Global { smx_process_t current_process; xbt_dict_t registered_functions; - void* (*create_process_function) (); - void* (*kill_process_function)(); + smx_creation_func_t *create_process_function; + void_f_pvoid_t* kill_process_function; + void_f_pvoid_t* cleanup_process_function; } s_SIMIX_Global_t, *SIMIX_Global_t; extern SIMIX_Global_t simix_global; @@ -58,7 +60,7 @@ typedef struct s_smx_simdata_process { typedef struct s_smx_process_arg { const char *name; - smx_process_code_t code; + xbt_main_func_t code; void *data; char *hostname; int argc; @@ -69,15 +71,21 @@ typedef struct s_smx_process_arg { /********************************* Mutex and Conditional ****************************/ typedef struct s_smx_mutex { - xbt_swag_t sleeping; /* list of sleeping process */ - int using; + + /* KEEP IT IN SYNC WITH src/xbt_sg_thread.c::struct s_xbt_mutex */ + xbt_swag_t sleeping; /* list of sleeping process */ + int using; + /* KEEP IT IN SYNC WITH src/xbt_sg_thread.c::struct s_xbt_mutex */ } s_smx_mutex_t; typedef struct s_smx_cond { - xbt_swag_t sleeping; /* list of sleeping process */ - smx_mutex_t mutex; - xbt_fifo_t actions; /* list of actions */ + + /* KEEP IT IN SYNC WITH src/xbt_sg_thread.c::struct s_xbt_cond */ + xbt_swag_t sleeping; /* list of sleeping process */ + smx_mutex_t mutex; + xbt_fifo_t actions; /* list of actions */ + /* KEEP IT IN SYNC WITH src/xbt_sg_thread.c::struct s_xbt_cond */ } s_smx_cond_t; @@ -111,8 +119,4 @@ void __SIMIX_host_destroy(smx_host_t host); void __SIMIX_cond_wait(smx_cond_t cond); -void __SIMIX_display_process_status(void); - - - #endif