Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Used test with receiver.
[simgrid.git] / src / msg / gos.c
index 943df63..6ad4005 100644 (file)
@@ -470,6 +470,17 @@ int MSG_comm_test(msg_comm_t comm) {
        return SIMIX_network_test(comm);
 }
 
+/* After received TRUE to MSG_comm_test() function we have to destroy the communication */
+void MSG_comm_destroy(msg_comm_t comm) {
+       if(!(comm->src_proc == SIMIX_process_self()))
+       {
+               m_task_t  task;
+               task = (m_task_t) SIMIX_communication_get_src_buf(comm);
+               task->simdata->refcount--;
+       }
+       SIMIX_communication_destroy(comm);
+}
+
 MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout) {
        xbt_ex_t e;
        MSG_error_t res = MSG_OK;