void SIMIX_create_maestro_process(void);
void SIMIX_process_empty_trash(void);
void SIMIX_process_schedule(smx_process_t process);
-void SIMIX_process_yield(void);
ex_ctx_t *SIMIX_process_get_exception(void);
void SIMIX_process_exception_terminate(xbt_ex_t * e);
-
/*************************** Mutex and Conditional ****************************/
typedef struct s_smx_mutex {
} s_smx_cond_t;
+/******************************* Networking ***********************************/
+
+/** @brief Rendez-vous point datatype */
+typedef struct s_smx_rvpoint {
+ char *name;
+ smx_mutex_t read;
+ smx_mutex_t write;
+ xbt_fifo_t comm_fifo;
+ void *data;
+} s_smx_rvpoint_t;
+
+typedef struct s_smx_comm {
+
+
+ smx_comm_type_t type; /* Type of the communication (comm_send,comm_recv) */
+ smx_rdv_t rdv; /* Rendez-vous where the comm is queued */
+ smx_cond_t cond; /* Condition associated to the surf simulation */
+ int refcount; /* Number of processes involved in the cond */
+
+ /* Surf action data */
+ smx_process_t src_proc;
+ smx_process_t dst_proc;
+ smx_action_t act;
+ double rate;
+ double task_size;
+
+ /* Data to be transfered */
+ void *src_buff;
+ size_t src_buff_size;
+ void *dst_buff;
+ size_t *dst_buff_size;
+ void *data; /* User data associated to communication */
+} s_smx_comm_t;
+
+void SIMIX_network_copy_data(smx_comm_t comm);
+smx_comm_t SIMIX_communication_new(smx_comm_type_t type);
+void SIMIX_communication_destroy(smx_comm_t comm);
+static inline void SIMIX_communication_use(smx_comm_t comm);
+static inline void SIMIX_communication_wait_for_completion(smx_comm_t comm, double timeout);
+static inline void SIMIX_rdv_push(smx_rdv_t rdv, smx_comm_t comm);
+static inline void SIMIX_rdv_remove(smx_rdv_t rdv, smx_comm_t comm);
+
/********************************* Action *************************************/
+typedef enum {ready, ongoing, done, failed} smx_action_state_t;
+
/** @brief Action datatype
@ingroup m_datatypes_management_details */
typedef struct s_smx_action {