X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/446516ef6cc8459883ad5b3a53cd724e24185c21..7576230c94b48b0422725f7dec95dd2831cf57dc:/include/simgrid/simix.h diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index edf577780e..f1c82114b2 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -19,9 +19,8 @@ SG_BEGIN_DECL() /* ******************************** Host ************************************ */ -/** @defgroup m_datatypes_management_details Details on SIMIX datatypes */ /** @brief Host datatype - @ingroup m_datatypes_management + @ingroup simix_host_management A location (or host) is any possible place where a process may run. Thus it is represented as a physical @@ -52,8 +51,17 @@ typedef enum { typedef struct s_smx_timer* smx_timer_t; /* ******************************** Synchro ************************************ */ +/** + * \ingroup simix_synchro_management + */ typedef struct s_smx_mutex *smx_mutex_t; +/** + * \ingroup simix_synchro_management + */ typedef struct s_smx_cond *smx_cond_t; +/** + * \ingroup simix_synchro_management + */ typedef struct s_smx_sem *smx_sem_t; /********************************** File *************************************/ @@ -67,7 +75,7 @@ typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized acti /* ****************************** Process *********************************** */ /** @brief Process datatype - @ingroup m_datatypes_management + @ingroup simix_process_management A processt may be defined as a code, with some private data, executing in a location. @@ -96,10 +104,14 @@ typedef void (*smx_creation_func_t) ( /* process */ smx_process_t*, /* kill_time */ double, /* argc */ int, /* argv */ char**, - /* props */ xbt_dict_t); + /* props */ xbt_dict_t, + /* auto_restart */ int); /******************************* Networking ***********************************/ +/** + * \ingroup simix_rdv_management + */ typedef struct s_smx_rvpoint *smx_rdv_t; /******************************** Context *************************************/ @@ -109,6 +121,8 @@ 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 */ +typedef void (*void_pfn_smxhost_t) (smx_host_t); /* The following function pointer types describe the interface that any context factory should implement */ @@ -252,8 +266,8 @@ XBT_PUBLIC(void*) SIMIX_process_self_get_data(smx_process_t self); XBT_PUBLIC(smx_context_t) SIMIX_process_get_context(smx_process_t); XBT_PUBLIC(void) SIMIX_process_set_context(smx_process_t p,smx_context_t c); XBT_PUBLIC(int) SIMIX_process_has_pending_comms(smx_process_t process); -XBT_PUBLIC(void) SIMIX_process_on_exit(smx_process_t process); -XBT_PUBLIC(void) SIMIX_process_on_exit_add(int_f_pvoid_t fun, void *data); +XBT_PUBLIC(void) SIMIX_process_on_exit_runall(smx_process_t process); +XBT_PUBLIC(void) SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data); /****************************** Communication *********************************/ XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, void*, size_t)); @@ -314,7 +328,8 @@ XBT_PUBLIC(void) simcall_process_create(smx_process_t *process, const char *hostname, double kill_time, int argc, char **argv, - xbt_dict_t properties); + xbt_dict_t properties, + int auto_restart); XBT_PUBLIC(void) simcall_process_kill(smx_process_t process); XBT_PUBLIC(void) simcall_process_killall(void); @@ -335,7 +350,8 @@ XBT_PUBLIC(const char *) simcall_process_get_name(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); - +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); /* Sleep control */ XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration); @@ -431,7 +447,7 @@ XBT_PUBLIC(void) simcall_sem_acquire_timeout(smx_sem_t sem, XBT_PUBLIC(unsigned int) simcall_sem_acquire_any(xbt_dynar_t sems); XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem); -XBT_PUBLIC(size_t) simcall_file_read(void* ptr, size_t size, size_t nmemb, smx_file_t stream); +XBT_PUBLIC(double) simcall_file_read(void* ptr, size_t size, size_t nmemb, smx_file_t stream); XBT_PUBLIC(size_t) simcall_file_write(const void* ptr, size_t size, size_t nmemb, smx_file_t stream); 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);