Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add convenient debug function on conditions and use it in simix.
[simgrid.git] / src / simix / smx_synchro.c
index 74fd1f0..64d4d69 100644 (file)
@@ -315,3 +315,17 @@ void SIMIX_cond_destroy(smx_cond_t cond)
     return;
   }
 }
+
+void SIMIX_cond_display_info(smx_cond_t cond)
+{
+  if (cond == NULL)
+    return;
+  else {
+    smx_process_t process = NULL;
+
+    INFO0("Blocked process on this condition:");
+    xbt_swag_foreach(process,cond->sleeping) {
+      INFO2("\t %s running on host %s",process->name,process->simdata->smx_host->name);
+    }
+  }
+}