Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Add attribute "noreturn" to non-returning functions.
[simgrid.git] / src / mc / remote / Client.hpp
index 05a395a..ddbdb97 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2015-2019. 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. */
@@ -7,18 +6,10 @@
 #ifndef SIMGRID_MC_CLIENT_H
 #define SIMGRID_MC_CLIENT_H
 
-#include "src/internal_config.h"
+#include "src/mc/remote/Channel.hpp"
 
-#include <cstddef>
 #include <memory>
 
-#include <xbt/base.h>
-
-#include <simgrid/simix.h>
-
-#include "src/mc/remote/Channel.hpp"
-#include "src/mc/remote/mc_protocol.h"
-
 namespace simgrid {
 namespace mc {
 
@@ -26,7 +17,7 @@ namespace mc {
  *
  *  Send messages to the model-checker and handles message from it.
  */
-class XBT_PUBLIC() Client {
+class XBT_PUBLIC Client {
 private:
   Channel channel_;
   static std::unique_ptr<Client> instance_;
@@ -37,8 +28,8 @@ public:
   void handleMessages();
 
 private:
-  void handleDeadlockCheck(mc_message_t* msg);
-  void handleContinue(mc_message_t* msg);
+  void handleDeadlockCheck(s_mc_message_t* msg);
+  void handleContinue(s_mc_message_t* msg);
   void handleSimcall(s_mc_message_simcall_handle_t* message);
   void handleRestore(s_mc_message_restore_t* msg);
   void handleActorEnabled(s_mc_message_actor_enabled_t* msg);
@@ -46,8 +37,8 @@ private:
 public:
   Channel const& getChannel() const { return channel_; }
   Channel& getChannel() { return channel_; }
-  void mainLoop();
-  void reportAssertionFailure(const char* description = nullptr);
+  XBT_ATTRIB_NORETURN void mainLoop();
+  void reportAssertionFailure();
   void ignoreMemory(void* addr, std::size_t size);
   void ignoreHeap(void* addr, std::size_t size);
   void unignoreHeap(void* addr, std::size_t size);