Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Corrections to the code that handles the errors in the comms in SMX network [Cristian]
[simgrid.git] / src / include / simix / simix.h
index 86e257f..0260a97 100644 (file)
@@ -20,7 +20,6 @@ SG_BEGIN_DECL()
 
 
 /************************** Global ******************************************/
-XBT_PUBLIC(void) SIMIX_config(const char *name, va_list pa);
 XBT_PUBLIC(void) SIMIX_global_init(int *argc, char **argv);
 XBT_PUBLIC(void) SIMIX_clean(void);
 XBT_PUBLIC(void) SIMIX_function_register(const char *name,
@@ -95,12 +94,6 @@ XBT_PUBLIC(smx_process_t) SIMIX_process_create(const char *name,
                                                char **argv,
                                                xbt_dict_t properties);
 
-XBT_PUBLIC(void) SIMIX_jprocess_create(const char *name,
-                                       smx_host_t host,
-                                       void *data,
-                                       void *jprocess, void *jenv,
-                                       smx_process_t * res);
-
 XBT_PUBLIC(void) SIMIX_process_kill(smx_process_t process);
 XBT_PUBLIC(void) SIMIX_process_cleanup(void *arg);
 XBT_PUBLIC(void) SIMIX_process_killall(void);
@@ -118,6 +111,7 @@ XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
 XBT_PUBLIC(void) SIMIX_process_suspend(smx_process_t process);
 XBT_PUBLIC(void) SIMIX_process_resume(smx_process_t process);
 XBT_PUBLIC(int) SIMIX_process_is_suspended(smx_process_t process);
+XBT_PUBLIC(int) SIMIX_process_is_blocked(smx_process_t process);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) SIMIX_process_get_properties(smx_process_t host);
@@ -175,8 +169,38 @@ XBT_PUBLIC(smx_action_t) SIMIX_action_parallel_execute(char *name,
                                                        double amount,
                                                        double rate);
 
-     void SIMIX_display_process_status(void);
-
+XBT_PUBLIC(char *) SIMIX_action_get_name(smx_action_t action);
+XBT_PUBLIC(void) SIMIX_action_signal_all(smx_action_t action);
+XBT_PUBLIC(void) SIMIX_display_process_status(void);
+/************************** Comunication Handling *****************************/
+
+/* Public */
+XBT_PUBLIC(smx_rdv_t) SIMIX_rdv_create(const char *name);
+XBT_PUBLIC(void) SIMIX_rdv_destroy(smx_rdv_t rvp);
+XBT_PUBLIC(void) SIMIX_network_send(smx_rdv_t rdv, double task_size, double rate,
+                                    double timeout, void *data, size_t data_size,
+                                    int (filter)(smx_comm_t, void *), void *arg);
+XBT_PUBLIC(void) SIMIX_network_recv(smx_rdv_t rdv, double timeout, void *data,
+                                    size_t *data_size, int (filter)(smx_comm_t, void *), void *arg);
+XBT_PUBLIC(void) SIMIX_network_wait(smx_action_t comm);
+XBT_PUBLIC(int) SIMIX_network_test(smx_action_t comm);
+XBT_PUBLIC(int) SIMIX_communication_isSend(smx_comm_t comm);
+XBT_PUBLIC(int) SIMIX_communication_isRecv(smx_comm_t comm);
+
+/* FIXME: Filter function */
+int comm_filter_get(smx_comm_t comm, void *arg);
+int comm_filter_put(smx_comm_t comm, void *arg);
+
+/* These should be private to SIMIX */
+smx_comm_t SIMIX_communication_new(smx_comm_type_t type, smx_rdv_t rdv);
+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);
+smx_comm_t SIMIX_rdv_get_request(smx_rdv_t rdv, int (filter)(smx_comm_t, void *), void *arg);
+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);
+static inline smx_cond_t SIMIX_rdv_get_cond(smx_rdv_t rdv);
+void SIMIX_network_copy_data(smx_comm_t comm);
 
 SG_END_DECL()
 #endif /* _SIMIX_SIMIX_H */