X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/865fb6d28e7238d339064278d4a14f40dd335da9..080541387d2296c808397215b8c9401a9f97a1d5:/src/simix/popping_private.hpp diff --git a/src/simix/popping_private.hpp b/src/simix/popping_private.hpp index 3e574c93dc..856ddf5bde 100644 --- a/src/simix/popping_private.hpp +++ b/src/simix/popping_private.hpp @@ -8,34 +8,32 @@ #include "simgrid/forward.h" #include "src/kernel/activity/ActivityImpl.hpp" - -#include -#include +#include "xbt/utility.hpp" /********************************* Simcalls *********************************/ namespace simgrid { namespace simix { -/** All possible simcalls. */ -XBT_DECLARE_ENUM_CLASS(Simcall, NONE, RUN_ANSWERED, RUN_BLOCKING); -} // namespace simix -} // namespace simgrid - /** * @brief Represents a simcall to the kernel. */ -struct s_smx_simcall { - simgrid::simix::Simcall call_ = simgrid::simix::Simcall::NONE; +class Simcall { +public: + /** All possible simcalls. */ + XBT_DECLARE_ENUM_CLASS(Type, NONE, RUN_ANSWERED, RUN_BLOCKING); + + Type call_ = Type::NONE; smx_actor_t issuer_ = nullptr; simgrid::kernel::timer::Timer* timeout_cb_ = nullptr; // Callback to timeouts simgrid::kernel::actor::SimcallObserver* observer_ = nullptr; // makes that simcall observable by the MC unsigned int mc_max_consider_ = 0; // How many times this simcall should be used. If >1, this will be a fork in the state space. std::function const* code_ = nullptr; -}; -/******************************** General *************************************/ + const char* get_cname() const; +}; -XBT_PRIVATE const char* SIMIX_simcall_name(const s_smx_simcall& simcall); +} // namespace simix +} // namespace simgrid #endif