X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2057d436f1e55c886a8dccaa1b623e7ae236e1ec..c24da98fc757fe34eb3fdb29b01c80d77313a80a:/include/simgrid/simix.h diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index f1c82114b2..d1af9c2b70 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -120,8 +120,9 @@ typedef struct s_smx_context_factory *smx_context_factory_t; /* Process creation/destruction callbacks */ typedef void (*void_pfn_smxprocess_t) (smx_process_t); - -/* for function autorestart */ +/* Process kill */ +typedef void (*void_pfn_smxprocess_t_smxprocess_t) (smx_process_t, smx_process_t); +/* for auto-restart function */ typedef void (*void_pfn_smxhost_t) (smx_host_t); /* The following function pointer types describe the interface that any context @@ -214,12 +215,11 @@ 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); XBT_PUBLIC(void) SIMIX_function_register_process_create(smx_creation_func_t function); -XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_pfn_smxprocess_t function); +XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_pfn_smxprocess_t_smxprocess_t function); /* Simulation execution */ XBT_PUBLIC(void) SIMIX_run(void); @@ -352,6 +352,7 @@ 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); XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data); XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart); +XBT_PUBLIC(smx_process_t) simcall_process_restart(smx_process_t process); /* Sleep control */ XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration); @@ -363,6 +364,8 @@ XBT_PUBLIC(void) simcall_rdv_destroy(smx_rdv_t rvp); XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name); XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host); XBT_PUBLIC(smx_action_t) simcall_rdv_get_head(smx_rdv_t rdv); +XBT_PUBLIC(smx_process_t) simcall_rdv_get_receiver(smx_rdv_t rdv); +XBT_PUBLIC(void) simcall_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process); XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void); @@ -392,7 +395,8 @@ XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, void *data); 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(void) simcall_comm_cancel(smx_action_t comm); /* FIXME: waitany is going to be a vararg function, and should take a timeout */ @@ -452,6 +456,18 @@ XBT_PUBLIC(size_t) simcall_file_write(const void* ptr, size_t size, size_t nmemb XBT_PUBLIC(smx_file_t) simcall_file_open(const char* storage, const char* path, const char* mode); XBT_PUBLIC(int) simcall_file_close(smx_file_t fp); XBT_PUBLIC(int) simcall_file_stat(smx_file_t fd, s_file_stat_t *buf); +XBT_PUBLIC(int) simcall_file_unlink(smx_file_t fd); +XBT_PUBLIC(xbt_dict_t) simcall_file_ls(const char* mount, const char* path); + +/************************** AS router **********************************/ +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); + +/************************** 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 */