Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Big move of all SMPI files in subfolders because it was a mess.
[simgrid.git] / src / mc / remote / Client.cpp
index 2962c8f..e82f142 100644 (file)
@@ -23,7 +23,7 @@
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
 
-#include "src/smpi/private.hpp"
+#include "src/smpi/include/private.hpp"
 
 // We won't need those once the separation MCer/MCed is complete:
 #include "src/mc/mc_smx.h"
@@ -33,7 +33,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
 namespace simgrid {
 namespace mc {
 
-std::unique_ptr<Client> Client::client_;
+std::unique_ptr<Client> Client::instance_;
 
 Client* Client::initialize()
 {
@@ -43,8 +43,8 @@ Client* Client::initialize()
     return nullptr;
 
   // Do not break if we are called multiple times:
-  if (client_)
-    return client_.get();
+  if (instance_)
+    return instance_.get();
 
   _sg_do_model_check = 1;
 
@@ -65,7 +65,7 @@ Client* Client::initialize()
     xbt_die("Unexpected socket type %i", type);
   XBT_DEBUG("Model-checked application found expected socket type");
 
-  client_ = std::unique_ptr<Client>(new simgrid::mc::Client(fd));
+  instance_ = std::unique_ptr<Client>(new simgrid::mc::Client(fd));
 
   // Wait for the model-checker:
   errno = 0;
@@ -79,8 +79,8 @@ Client* Client::initialize()
   if (errno != 0 || raise(SIGSTOP) != 0)
     xbt_die("Could not wait for the model-checker");
 
-  client_->handleMessages();
-  return client_.get();
+  instance_->handleMessages();
+  return instance_.get();
 }
 
 void Client::handleDeadlockCheck(mc_message_t* msg)
@@ -101,6 +101,7 @@ void Client::handleDeadlockCheck(mc_message_t* msg)
 }
 void Client::handleContinue(mc_message_t* msg)
 {
+  /* Nothing to do */
 }
 void Client::handleSimcall(s_mc_message_simcall_handle_t* message)
 {
@@ -223,7 +224,7 @@ void Client::unignoreHeap(void* address, std::size_t size)
 
 void Client::declareSymbol(const char* name, int* value)
 {
-  s_mc_register_symbol_message_t message;
+  s_mc_message_register_symbol_t message;
   message.type = MC_MESSAGE_REGISTER_SYMBOL;
   if (strlen(name) + 1 > sizeof(message.name))
     xbt_die("Symbol is too long");