X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/470b276614f45ce71f58dad1c2ab118aa3e4d1bb..ae11ab3b4a647d982dc92a2c7dd10fb3cb853916:/src/msg/gos.c diff --git a/src/msg/gos.c b/src/msg/gos.c index 943df6371d..6ad4005acc 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -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;