1 /* Copyright (c) 2010-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. */
6 #include "src/kernel/actor/Simcall.hpp"
7 #include "simgrid/s4u/Host.hpp"
8 #include "src/kernel/actor/ActorImpl.hpp"
9 #include "src/kernel/actor/SimcallObserver.hpp"
10 #include "src/kernel/context/Context.hpp"
13 namespace simgrid::kernel::actor {
15 /** @brief returns a printable string representing a simcall */
16 const char* Simcall::get_cname() const
18 if (observer_ != nullptr) {
19 static std::string name;
20 name = boost::core::demangle(typeid(*observer_).name());
21 const char* cname = name.c_str();
22 if (name.rfind("simgrid::kernel::", 0) == 0)
23 cname += 17; // strip prefix "simgrid::kernel::"
26 return to_c_str(call_);
29 ObjectAccessSimcallItem::ObjectAccessSimcallItem()
33 void ObjectAccessSimcallItem::take_ownership()
35 simcall_owner_ = ActorImpl::self();
38 } // namespace simgrid::kernel::actor