Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot//simgrid/simgrid
authorChristophe Thiéry <christopho128@gmail.com>
Fri, 6 Jan 2012 14:27:35 +0000 (15:27 +0100)
committerChristophe Thiéry <christopho128@gmail.com>
Fri, 6 Jan 2012 14:27:35 +0000 (15:27 +0100)
src/msg/msg_process.c
src/simix/smx_process.c

index 8a2f8ea..5030416 100644 (file)
@@ -26,6 +26,11 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg,
  */
 
 /******************************** Process ************************************/
+
+/**
+ * \brief Cleans the MSG data of a process.
+ * \param smx_proc a SIMIX process
+ */
 void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
 {
   simdata_process_t msg_proc;
@@ -33,9 +38,11 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
   if (smx_proc == SIMIX_process_self()) {
     /* avoid a SIMIX request if this function is called by the process itself */
     msg_proc = SIMIX_process_self_get_data(smx_proc);
+    SIMIX_process_self_set_data(smx_proc, NULL);
   }
   else {
     msg_proc = SIMIX_req_process_get_data(smx_proc);
+    SIMIX_req_process_set_data(smx_proc, NULL);
   }
 
 #ifdef HAVE_TRACING
index bd34137..c698c7c 100644 (file)
@@ -270,6 +270,7 @@ void SIMIX_process_kill(smx_process_t process) {
         break;
 
       case SIMIX_ACTION_COMMUNICATE:
+        xbt_fifo_remove(process->comms, process->waiting_action);
         SIMIX_comm_destroy(process->waiting_action);
         break;