Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make SIMIX_req_comm(test/wait/testany/waitany) requests to destroy the comm actions.
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 31 Jan 2011 16:21:54 +0000 (16:21 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 31 Jan 2011 16:21:54 +0000 (16:21 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9538 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/gos.c
src/msg/msg_mailbox.c
src/simix/smx_network.c

index 8093c97..aefe0ec 100644 (file)
@@ -604,7 +604,7 @@ void MSG_comm_destroy(msg_comm_t comm)
   }
 
   /* FIXME auto-destroy comms from SIMIX to avoid this request */
   }
 
   /* FIXME auto-destroy comms from SIMIX to avoid this request */
-  SIMIX_req_comm_destroy(comm->s_comm);
+  /*SIMIX_req_comm_destroy(comm->s_comm);*/
   free(comm);
 }
 
   free(comm);
 }
 
index 07e19c4..194c133 100644 (file)
@@ -118,7 +118,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
     xbt_ex_free(e);
   }
   if (comm != NULL) {
     xbt_ex_free(e);
   }
   if (comm != NULL) {
-    SIMIX_req_comm_destroy(comm);
+    //SIMIX_req_comm_destroy(comm);
   }
 
   if (ret != MSG_HOST_FAILURE &&
   }
 
   if (ret != MSG_HOST_FAILURE &&
@@ -193,7 +193,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
   }
 
   if (comm != NULL) {
   }
 
   if (comm != NULL) {
-    SIMIX_req_comm_destroy(comm);
+    //SIMIX_req_comm_destroy(comm);
   }
 
   process->simdata->waiting_task = NULL;
   }
 
   process->simdata->waiting_task = NULL;
index 113b9d6..a5868d1 100644 (file)
@@ -508,6 +508,7 @@ static XBT_INLINE void SIMIX_comm_start(smx_action_t action)
 
 void SIMIX_comm_finish(smx_action_t action)
 {
 
 void SIMIX_comm_finish(smx_action_t action)
 {
+  unsigned int destroy_count = 0;
   smx_req_t req;
 
   while ((req = xbt_fifo_shift(action->request_list))) {
   smx_req_t req;
 
   while ((req = xbt_fifo_shift(action->request_list))) {
@@ -606,7 +607,11 @@ void SIMIX_comm_finish(smx_action_t action)
 
     req->issuer->waiting_action = NULL;
     SIMIX_request_answer(req);
 
     req->issuer->waiting_action = NULL;
     SIMIX_request_answer(req);
+    destroy_count++;
   }
   }
+
+  while(destroy_count-- > 0)
+    SIMIX_comm_destroy(action);
 }
 
 void SIMIX_post_comm(smx_action_t action)
 }
 
 void SIMIX_post_comm(smx_action_t action)