Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' *.[ch] Please people, stop using tabs in your source
[simgrid.git] / src / xbt / parmap.c
index 8219493..d163965 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