Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correctly sort config entries for --help.
[simgrid.git] / src / xbt / parmap.cpp
index a0689f0..935149f 100644 (file)
@@ -4,6 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <atomic>
+#include <climits>
 
 #include "src/internal_config.h"
 #if HAVE_UNISTD_H
@@ -15,8 +16,8 @@
 #endif
 
 #if HAVE_FUTEX_H
+#include <climits>
 #include <linux/futex.h>
-#include <limits.h>
 #endif
 
 #include "xbt/parmap.h"
@@ -117,7 +118,7 @@ xbt_parmap_t xbt_parmap_new(unsigned int num_workers, e_xbt_parmap_mode_t mode)
   parmap->workers[0] = nullptr;
 #if HAVE_PTHREAD_SETAFFINITY
   int core_bind = 0;
-#endif  
+#endif
   for (unsigned int i = 1; i < num_workers; i++) {
     xbt_parmap_thread_data_t data = xbt_new0(s_xbt_parmap_thread_data_t, 1);
     data->parmap = parmap;
@@ -128,7 +129,7 @@ xbt_parmap_t xbt_parmap_new(unsigned int num_workers, e_xbt_parmap_mode_t mode)
     if (core_bind != xbt_os_get_numcores() - 1)
       core_bind++;
     else
-      core_bind = 0; 
+      core_bind = 0;
 #endif
   }
   return parmap;