X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2a0579d84e5ce5050e084197f09f5d51b067c34a..5f5a10db6fc4552782638abb4817041223e17775:/src/mc/remote/AppSide.hpp diff --git a/src/mc/remote/AppSide.hpp b/src/mc/remote/AppSide.hpp index b1cd172dfe..03250e901b 100644 --- a/src/mc/remote/AppSide.hpp +++ b/src/mc/remote/AppSide.hpp @@ -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 -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 instance_; + std::unordered_map child_statuses_; public: AppSide(); @@ -30,30 +30,23 @@ public: void handle_messages(); private: - void handle_deadlock_check(const s_mc_message_t* msg); - void handle_continue(const s_mc_message_t* msg); - void handle_simcall(const s_mc_message_simcall_handle_t* message); - void handle_actor_enabled(const s_mc_message_actor_enabled_t* msg); + 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_fork_t* msg); + void handle_wait_child(const s_mc_message_int_t* msg); + void handle_actors_status() const; + void handle_actors_maxpid() const; public: Channel const& get_channel() const { return channel_; } Channel& get_channel() { return channel_; } XBT_ATTRIB_NORETURN void main_loop(); void report_assertion_failure(); - void ignore_memory(void* addr, std::size_t size); - void ignore_heap(void* addr, std::size_t size); - void unignore_heap(void* addr, std::size_t size); - void declare_symbol(const char* name, int* value); -#if HAVE_UCONTEXT_H - void declare_stack(void* stack, size_t size, ucontext_t* context); -#endif - // Singleton :/ // TODO, remove the singleton antipattern. - static AppSide* initialize(); - static AppSide* get() { return instance_.get(); } + static AppSide* get(); }; -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc #endif