X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0db566319780080d97b6b0e66717959b42ff228..c82adb6ec2917d3ec0657dab7e5d1d053759accd:/src/mc/Client.hpp diff --git a/src/mc/Client.hpp b/src/mc/Client.hpp index 69248bcfc7..6de722cbeb 100644 --- a/src/mc/Client.hpp +++ b/src/mc/Client.hpp @@ -7,8 +7,9 @@ #ifndef SIMGRID_MC_CLIENT_H #define SIMGRID_MC_CLIENT_H -#include +#include "src/internal_config.h" +#include #include #include @@ -21,6 +22,10 @@ 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,17 +33,19 @@ private: static std::unique_ptr 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_; } - void mainLoop(void); + void mainLoop(); void reportAssertionFailure(const char* description = nullptr); void ignoreMemory(void* addr, std::size_t size); void ignoreHeap(void* addr, std::size_t size); void unignoreHeap(void* addr, std::size_t size); void declareSymbol(const char *name, int* value); - void declareStack(void *stack, size_t size, smx_process_t process, ucontext_t* context); +#if HAVE_UCONTEXT_H + void declareStack(void *stack, size_t size, smx_actor_t process, ucontext_t* context); +#endif // Singleton :/ // TODO, remove the singleton antipattern.