X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e34d715bca0465a05c87301f6d0238d1a516c74..2be8ce37c4ff2c151c8cb5f8daa7ee069c136911:/src/kernel/actor/Simcall.hpp diff --git a/src/kernel/actor/Simcall.hpp b/src/kernel/actor/Simcall.hpp index 2d561cb30f..0138878bd9 100644 --- a/src/kernel/actor/Simcall.hpp +++ b/src/kernel/actor/Simcall.hpp @@ -1,41 +1,39 @@ -/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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. */ -#ifndef SIMCALL_HPP -#define SIMCALL_HPP +#ifndef SIMGRID_SIMCALL_HPP +#define SIMGRID_SIMCALL_HPP #include "simgrid/forward.h" -#include "src/kernel/activity/ActivityImpl.hpp" #include "xbt/utility.hpp" -/********************************* Simcalls *********************************/ -namespace simgrid { -namespace kernel { -namespace actor { +namespace simgrid::kernel::actor { -/** - * @brief Represents a simcall to the kernel. - */ +/** Contains what's needed to run some code in kernel mode on behalf of an actor */ 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::actor::ActorImpl* 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; const char* get_cname() const; }; -} // namespace actor -} // namespace kernel -} // namespace simgrid +/** A thing that can be used for an ObjectAccess simcall (getter or setter). */ +class ObjectAccessSimcallItem { +public: + ObjectAccessSimcallItem(); + void take_ownership(); + ActorImpl* simcall_owner_; +}; + +} // namespace simgrid::kernel::actor #endif