]> AND Public Git Repository - simgrid.git/blobdiff - src/xbt/parmap.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/MC_IS_ENABLED/MC_is_active()/ to remove an unfriendly pitfall of the codebase
[simgrid.git] / src / xbt / parmap.c
index 8219493515a01683c5af1fd31e443728d6d9c200..d163965fe509738e72d5935418e72463cf105222 100644 (file)
@@ -416,8 +416,10 @@ static void xbt_parmap_futex_worker_wait(xbt_parmap_t parmap, unsigned round)
 {
   unsigned work = parmap->work;
   /* wait for more work */
-  if (work != round)
+  while (work != round) {
     futex_wait(&parmap->work, work);
+    work = parmap->work;
+  }
 }
 #endif