X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/221538a27f21e52c182ae7fcc08c78c1175395b9..8e8f8b64b899284cbd166542ba352cd0c44059e8:/include/simgrid/simix.h diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 5fe3313051..599746406a 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -17,6 +17,9 @@ SG_BEGIN_DECL() +/**************************** Scalar Values **********************************/ + +typedef union u_smx_scalar u_smx_scalar_t; /* ******************************** Host ************************************ */ /** @brief Host datatype @@ -31,7 +34,8 @@ SG_BEGIN_DECL() \see m_host_management @{ */ -typedef struct s_smx_host *smx_host_t; +typedef xbt_dictelm_t smx_host_t; +typedef struct s_smx_host_priv *smx_host_priv_t; typedef enum { SIMIX_WAITING, SIMIX_READY, @@ -114,6 +118,9 @@ typedef void (*smx_creation_func_t) ( /* process */ smx_process_t*, */ typedef struct s_smx_rvpoint *smx_rdv_t; +XBT_PUBLIC(void*) SIMIX_comm_get_src_data(smx_action_t action); +XBT_PUBLIC(void*) SIMIX_comm_get_dst_data(smx_action_t action); + /******************************** Context *************************************/ typedef struct s_smx_context *smx_context_t; typedef struct s_smx_context_factory *smx_context_factory_t; @@ -158,6 +165,7 @@ typedef void (*smx_ctx_factory_initializer_t)(smx_context_factory_t*); XBT_PUBLIC(smx_ctx_factory_initializer_t) smx_factory_initializer_to_use; extern char* smx_context_factory_name; extern int smx_context_stack_size; +extern int smx_context_stack_size_was_set; #ifdef HAVE_THREAD_LOCAL_STORAGE extern __thread smx_context_t smx_current_context; @@ -215,7 +223,6 @@ XBT_PUBLIC(void) SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode); /********************************** Global ************************************/ /* Initialization and exit */ XBT_PUBLIC(void) SIMIX_global_init(int *argc, char **argv); -XBT_PUBLIC(void) SIMIX_clean(void); XBT_PUBLIC(void) SIMIX_function_register_process_cleanup(void_pfn_smxprocess_t function); @@ -240,7 +247,9 @@ XBT_PUBLIC(void) SIMIX_create_environment(const char *file); XBT_PUBLIC(void) SIMIX_function_register(const char *name, xbt_main_func_t code); XBT_PUBLIC(void) SIMIX_function_register_default(xbt_main_func_t code); XBT_PUBLIC(xbt_main_func_t) SIMIX_get_registered_function(const char *name); +XBT_PUBLIC(void) SIMIX_init_application(void); XBT_PUBLIC(void) SIMIX_launch_application(const char *file); + XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host, const char *process_function, xbt_dynar_t arguments, @@ -248,7 +257,7 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host, double process_kill_time); /*********************************** Host *************************************/ -XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(void); +//XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(u_smx_scalar_t *args); XBT_PUBLIC(smx_host_t) SIMIX_host_get_by_name(const char *name); XBT_PUBLIC(smx_host_t) SIMIX_host_self(void); XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void); @@ -333,7 +342,7 @@ XBT_PUBLIC(void) simcall_process_create(smx_process_t *process, int auto_restart); XBT_PUBLIC(void) simcall_process_kill(smx_process_t process); -XBT_PUBLIC(void) simcall_process_killall(void); +XBT_PUBLIC(void) simcall_process_killall(int reset_pid); /* Process handling */ XBT_PUBLIC(void) simcall_process_cleanup(smx_process_t process); @@ -348,6 +357,8 @@ XBT_PUBLIC(void *) simcall_process_get_data(smx_process_t process); XBT_PUBLIC(void) simcall_process_set_data(smx_process_t process, void *data); XBT_PUBLIC(smx_host_t) simcall_process_get_host(smx_process_t process); XBT_PUBLIC(const char *) simcall_process_get_name(smx_process_t process); +XBT_PUBLIC(int) simcall_process_get_PID(smx_process_t process); +XBT_PUBLIC(int) simcall_process_get_PPID(smx_process_t process); XBT_PUBLIC(int) simcall_process_is_suspended(smx_process_t process); XBT_PUBLIC(xbt_dict_t) simcall_process_get_properties(smx_process_t host); XBT_PUBLIC(void) simcall_process_set_kill_time(smx_process_t process, double kill_time); @@ -398,6 +409,7 @@ XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, XBT_PUBLIC(void) simcall_comm_destroy(smx_action_t comm); XBT_PUBLIC(smx_action_t) simcall_comm_iprobe(smx_rdv_t rdv, int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data); +XBT_PUBLIC(double) simcall_comm_change_rate_first_action(smx_rdv_t rdv, double newrate); XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm); /* FIXME: waitany is going to be a vararg function, and should take a timeout */ @@ -465,5 +477,14 @@ XBT_PUBLIC(xbt_dict_t) SIMIX_asr_get_properties(const char *name); /************************** AS router simcalls ***************************/ XBT_PUBLIC(xbt_dict_t) simcall_asr_get_properties(const char *name); +/************************** MC simcalls **********************************/ +XBT_PUBLIC(void *) simcall_mc_snapshot(void); +XBT_PUBLIC(int) simcall_mc_compare_snapshots(void *s1, void *s2); + +/************************** New API simcalls **********************************/ +/* TUTORIAL: New API */ +/******************************************************************************/ +XBT_PUBLIC(int) simcall_new_api_fct(const char* param1, double param2); + SG_END_DECL() #endif /* _SIMIX_SIMIX_H */