]> AND Private Git Repository - loba.git/blobdiff - main.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Be consistent and hold mutex in any case when returning from condition_t::timedwait().
[loba.git] / main.cpp
index 4c70534b534c52b0bd61bb29bbca51ef3e9577c4..e148574a6ba72b31106398e92ab97d04d34688ed 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -24,6 +24,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(main);
 #include "misc.h"
 #include "options.h"
 #include "process.h"
 #include "misc.h"
 #include "options.h"
 #include "process.h"
+#include "simgrid_features.h"
 #include "statistics.h"
 #include "synchro.h"
 #include "timer.h"
 #include "statistics.h"
 #include "synchro.h"
 #include "timer.h"
@@ -202,7 +203,7 @@ int main(int argc, char* argv[])
     double simulated_time = -1.0;
     timestamp elapsed_time(timestamp::wallclock_time);
     timestamp simulation_time(timestamp::cpu_time);
     double simulated_time = -1.0;
     timestamp elapsed_time(timestamp::wallclock_time);
     timestamp simulation_time(timestamp::cpu_time);
-    MSG_error_t res;
+    msg_error_t res;
 
     elapsed_time.start();
     simulation_time.start();
 
     elapsed_time.start();
     simulation_time.start();
@@ -219,7 +220,7 @@ int main(int argc, char* argv[])
     }
 
     // Initialize some MSG internal data.
     }
 
     // Initialize some MSG internal data.
-    MSG_global_init(&argc, argv);
+    MSG_init(&argc, argv);
     install_signal_handler();
 
     // Parse global parameters
     install_signal_handler();
 
     // Parse global parameters
@@ -233,7 +234,7 @@ int main(int argc, char* argv[])
                 "Compiled on " << version::date << "\n\n";
         if (!parse_res || opt::help_requested)
             opt::usage();
                 "Compiled on " << version::date << "\n\n";
         if (!parse_res || opt::help_requested)
             opt::usage();
-        MSG_clean();
+        res = MSG_clean();
         exit(parse_res ? EXIT_NO_FAILURE : EXIT_FAILURE_ARGS);
     }
     XBT_INFO("%s v%s (%s)", opt::program_name.c_str(), version::num.c_str(),
         exit(parse_res ? EXIT_NO_FAILURE : EXIT_FAILURE_ARGS);
     }
     XBT_INFO("%s v%s (%s)", opt::program_name.c_str(), version::num.c_str(),