Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement reforks by forking the application, to save the app exec time
[simgrid.git] / src / mc / remote / AppSide.hpp
index 0c96f35..5dcb934 100644 (file)
@@ -1,6 +1,6 @@
 /* mc::remote::AppSide: the Application-side of the channel                 */
 
-/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2023. 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. */
@@ -12,8 +12,7 @@
 
 #include <memory>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Model-checked-side of the communication protocol
  *
@@ -23,6 +22,7 @@ class XBT_PUBLIC AppSide {
 private:
   Channel channel_;
   static std::unique_ptr<AppSide> instance_;
+  bool need_memory_info_ = false; /* by default we don't send memory info, unless we got a NEED_MEMINFO */
 
 public:
   AppSide();
@@ -31,9 +31,13 @@ public:
 
 private:
   void handle_deadlock_check(const s_mc_message_t* msg) const;
-  void handle_continue(const s_mc_message_t* msg) const;
-  void handle_simcall(const s_mc_message_simcall_handle_t* message) const;
-  void handle_actor_enabled(const s_mc_message_actor_enabled_t* msg) const;
+  void handle_simcall_execute(const s_mc_message_simcall_execute_t* message) const;
+  void handle_finalize(const s_mc_message_int_t* msg) const;
+  void handle_fork(const s_mc_message_int_t* msg);
+  void handle_wait_child(const s_mc_message_int_t* msg);
+  void handle_need_meminfo();
+  void handle_actors_status() const;
+  void handle_actors_maxpid() const;
 
 public:
   Channel const& get_channel() const { return channel_; }
@@ -53,7 +57,6 @@ public:
   static AppSide* initialize();
   static AppSide* get() { return instance_.get(); }
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif