Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix compil of smpi_bench.c on win32
[simgrid.git] / src / smpi / smpi_bench.c
index fe8f3b4..f7464db 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_bench, smpi,
                                 "Logging specific to SMPI (benchmarking)");
 
@@ -240,11 +244,11 @@ int smpi_gettimeofday(struct timeval *tv)
   return 0;
 }
 
-extern double sg_maxmin_precision;
+extern double sg_surf_precision;
 unsigned long long smpi_rastro_resolution (void)
 {
   smpi_bench_end();
-  double resolution = (1/sg_maxmin_precision);
+  double resolution = (1/sg_surf_precision);
   smpi_bench_begin();
   return (unsigned long long)resolution;
 }
@@ -570,7 +574,6 @@ void* smpi_shared_set_call(const char* func, const char* input, void* data) {
 
 
 
-#ifndef WIN32
 #define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
 
 
@@ -759,5 +762,3 @@ void smpi_destroy_global_memory_segments(){
 
 }
 
-
-#endif