Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
one step further on C++ization of replay
[simgrid.git] / src / smpi / smpi_global.cpp
index b70008b..34065aa 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -15,7 +14,7 @@
 #include "src/msg/msg_private.h"
 #include "src/simix/smx_private.h"
 #include "surf/surf.h"
-#include "xbt/replay.h"
+#include "xbt/replay.hpp"
 
 #include <float.h> /* DBL_MAX */
 #include <fstream>
@@ -213,7 +212,8 @@ bool smpi_process_get_replaying(){
   int index = smpi_process_index();
   if (index != MPI_UNDEFINED)
     return process_data[index_to_process_data[index]]->replaying;
-  else return (_xbt_replay_is_active() != 0);
+  else
+    return !simgrid::xbt::replay_is_active();
 }
 
 int smpi_global_size()
@@ -655,6 +655,8 @@ void smpi_global_destroy()
   smpi_free_static();
 }
 
+extern "C" {
+
 #ifndef WIN32
 
 void __attribute__ ((weak)) user_main_()
@@ -685,7 +687,6 @@ int __attribute__ ((weak)) main(int argc, char **argv)
 
 #endif
 
-extern "C" {
 static void smpi_init_logs(){
 
   /* Connect log categories.  See xbt/log.c */