Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/mwapl/simgrid
[simgrid.git] / src / mc / remote / AppSide.hpp
index 5dcb934e2a194b9bee8f5c8cb6c2355e56f2df60..3941ffae0cef549cfdb46d628fea3f7dd9b206f7 100644 (file)
@@ -23,6 +23,7 @@ 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 */
+  std::unordered_map<int, int> child_statuses_;
 
 public:
   AppSide();
@@ -33,7 +34,7 @@ private:
   void handle_deadlock_check(const s_mc_message_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_fork(const s_mc_message_fork_t* msg);
   void handle_wait_child(const s_mc_message_int_t* msg);
   void handle_need_meminfo();
   void handle_actors_status() const;
@@ -52,10 +53,8 @@ public:
   void declare_stack(void* stack, size_t size, ucontext_t* context) const;
 #endif
 
-  // Singleton :/
   // TODO, remove the singleton antipattern.
-  static AppSide* initialize();
-  static AppSide* get() { return instance_.get(); }
+  static AppSide* get();
 };
 } // namespace simgrid::mc