X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/87dcbdd62cdd688ee0d9cefc7ae54854148ec5fb..6d17036094433f0304c29b6f57922cee32b0c67c:/src/include/simix/datatypes.h?ds=inline diff --git a/src/include/simix/datatypes.h b/src/include/simix/datatypes.h index 4557bfdfce..93ddc97357 100644 --- a/src/include/simix/datatypes.h +++ b/src/include/simix/datatypes.h @@ -10,6 +10,7 @@ #define SIMIX_DATATYPE_H #include "xbt/misc.h" #include "xbt/swag.h" +#include "xbt/fifo.h" SG_BEGIN_DECL() @@ -17,12 +18,12 @@ SG_BEGIN_DECL() /** @defgroup m_datatypes_management_details Details on SIMIX datatypes @ingroup m_datatypes_management*/ -typedef struct s_simdata_host *simdata_host_t; +typedef struct s_smx_simdata_host *smx_simdata_host_t; /** @brief Host datatype @ingroup m_datatypes_management_details */ typedef struct s_smx_host { char *name; /**< @brief host name if any */ - simdata_host_t simdata; /**< @brief simulator data */ + smx_simdata_host_t simdata; /**< @brief simulator data */ void *data; /**< @brief user data */ } s_smx_host_t; /** @brief Host datatype @@ -48,12 +49,14 @@ typedef struct s_smx_cond *smx_cond_t; /********************************** Action *************************************/ -typedef struct s_simdata_action *simdata_action_t; +typedef struct s_smx_simdata_action *smx_simdata_action_t; /** @brief Action datatype @ingroup m_datatypes_management_details */ typedef struct s_smx_action { char *name; /**< @brief action name if any */ - simdata_action_t simdata; /**< @brief simulator data */ + smx_simdata_action_t simdata; /**< @brief simulator data */ + xbt_fifo_t cond_list; /*< conditional variables that must be signaled when the action finish. */ + void *data; /**< @brief user data */ } s_smx_action_t; @@ -61,16 +64,20 @@ typedef struct s_smx_action *smx_action_t; /* ****************************** Process *********************************** */ -typedef struct s_simdata_process *simdata_process_t; +typedef struct s_smx_simdata_process *smx_simdata_process_t; /** @brief Process datatype @ingroup m_datatypes_management_details @{ */ typedef struct s_smx_process { - char *name; /**< @brief process name if any */ - simdata_process_t simdata; /**< @brief simulator data */ - s_xbt_swag_hookup_t process_hookup; - s_xbt_swag_hookup_t synchro_hookup; - s_xbt_swag_hookup_t host_proc_hookup; - void *data; /**< @brief user data */ + + /* KEEP IT IN SYNC WITH s_xbt_thread_ from src/xbt_sg_thread.h */ + char *name; /**< @brief process name if any */ + smx_simdata_process_t simdata; /**< @brief simulator data */ + s_xbt_swag_hookup_t process_hookup; + s_xbt_swag_hookup_t synchro_hookup; + s_xbt_swag_hookup_t host_proc_hookup; + void *data; /**< @brief user data */ + /* KEEP IT IN SYNC WITH s_smx_process_ from src/xbt_sg_thread.h */ + } s_smx_process_t; /** @} */ /** @brief Agent datatype @@ -83,36 +90,5 @@ typedef struct s_smx_process { typedef struct s_smx_process *smx_process_t; /** @} */ -/** @brief Agent code - @ingroup m_datatypes_management - The code of an agent is a m_process_code_t, i.e. a function with no arguments - returning no value. - \see m_process_management - @{ */ -typedef int(*smx_process_code_t)(int argc,char *argv[]) ; -/** @} */ - - -/* ***************************** Error handling ***************************** */ -/** @brief Error handling - @ingroup m_datatypes_management - @{ -*/ -typedef enum { - SIMIX_OK = 0, /**< @brief Everything is right. Keep on going this way ! */ - SIMIX_WARNING, /**< @brief Mmmh! Something must be not perfectly clean. But I - may be a paranoid freak... ! */ - SIMIX_TRANSFER_FAILURE, /**< @brief There has been a problem during you action - transfer. Either the network is down or the remote host has been - shutdown. */ - SIMIX_HOST_FAILURE, /**< @brief System shutdown. The host on which you are - running has just been rebooted. Free your datastructures and - return now !*/ - SIMIX_ACTION_CANCELLED, /**< @brief Cancelled action. This action has been cancelled - by somebody!*/ - SIMIX_FATAL /**< @brief You've done something wrong. You'd better look at it... */ -} SIMIX_error_t; -/** @} */ - SG_END_DECL() #endif