Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / mc / Client.hpp
index 69248bc..9c6c642 100644 (file)
@@ -7,8 +7,9 @@
 #ifndef SIMGRID_MC_CLIENT_H
 #define SIMGRID_MC_CLIENT_H
 
-#include <cstddef>
+#include "src/internal_config.h"
 
+#include <cstddef>
 #include <memory>
 
 #include <xbt/base.h>
 namespace simgrid {
 namespace mc {
 
+/** Model-checked-side of the communication protocol
+ *
+ *  Send messages to the model-checker and handles message from it.
+ */
 class XBT_PUBLIC() Client {
 private:
   bool active_ = false;
@@ -28,7 +33,7 @@ private:
   static std::unique_ptr<Client> client_;
 public:
   Client();
-  Client(int fd) : active_(true), channel_(fd) {}
+  explicit Client(int fd) : active_(true), channel_(fd) {}
   void handleMessages();
   Channel const& getChannel() const { return channel_; }
   Channel& getChannel() { return channel_; }
@@ -38,7 +43,9 @@ public:
   void ignoreHeap(void* addr, std::size_t size);
   void unignoreHeap(void* addr, std::size_t size);
   void declareSymbol(const char *name, int* value);
+#if HAVE_UCONTEXT_H
   void declareStack(void *stack, size_t size, smx_process_t process, ucontext_t* context);
+#endif
 
   // Singleton :/
   // TODO, remove the singleton antipattern.