Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use of busy wait instead of futex if there is not futex.h
[simgrid.git] / src / xbt / parmap.c
index 0b922d0..0952118 100644 (file)
@@ -445,8 +445,11 @@ XBT_TEST_UNIT("basic", test_parmap_basic, "Basic usage")
   xbt_dynar_t data = xbt_dynar_new(sizeof(void *), NULL);
 
   /* Create the parallel map */
+#ifdef HAVE_FUTEX_H
   parmap = xbt_parmap_new(10, XBT_PARMAP_FUTEX);
-
+#else
+  parmap = xbt_parmap_new(10, XBT_PARMAP_BUSY_WAIT);
+#endif
   for (j = 0; j < 100; j++) {
     xbt_dynar_push_as(data, void *, (void *)j);
   }