X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f0cd4be195414e0a2db71f136f042a8b000f073e..31b7fa457f9267af8eda2eee06aae74dd78eb412:/src/simix/smx_network.c?ds=sidebyside diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index d1c83d3f07..11b84c6d64 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -246,7 +246,8 @@ void SIMIX_comm_destroy_internal_actions(smx_action_t action) smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, - int (*match_fun)(void *, void *), void *data) + int (*match_fun)(void *, void *), void *data, + int detached) { smx_action_t action; @@ -262,6 +263,11 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv, action->comm.type = SIMIX_COMM_READY; } + /* If the communication action is detached then decrease the refcount + * by one, so it will be eliminated by the receivers destroy call */ + if(detached) + action->comm.refcount--; + /* Setup the communication request */ action->comm.src_proc = src_proc; action->comm.task_size = task_size;