1 /* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "simgrid/forward.h"
10 #include "src/kernel/activity/ActivityImpl.hpp"
11 #include "xbt/utility.hpp"
13 /********************************* Simcalls *********************************/
14 namespace simgrid::kernel::actor {
17 * @brief Represents a simcall to the kernel.
21 /** All possible simcalls. */
22 XBT_DECLARE_ENUM_CLASS(Type, NONE, RUN_ANSWERED, RUN_BLOCKING);
24 Type call_ = Type::NONE;
25 simgrid::kernel::actor::ActorImpl* issuer_ = nullptr;
26 simgrid::kernel::timer::Timer* timeout_cb_ = nullptr; // Callback to timeouts
27 simgrid::kernel::actor::SimcallObserver* observer_ = nullptr; // makes that simcall observable by the MC
28 unsigned int mc_max_consider_ =
29 0; // How many times this simcall should be used. If >1, this will be a fork in the state space.
30 std::function<void()> const* code_ = nullptr;
32 const char* get_cname() const;
35 } // namespace simgrid::kernel::actor