return (self_context != nullptr) ? self_context->get_actor() : nullptr;
}
-ActorImpl::ActorImpl(std::string name, s4u::Host* host, aid_t ppid)
- : ActorIDTrait(std::move(name), ppid), host_(host), piface_(this)
+ActorImpl::ActorImpl(const std::string& name, s4u::Host* host, aid_t ppid)
+ : ActorIDTrait(name, ppid), host_(host), piface_(this)
{
simcall_.issuer_ = this;
stacksize_ = context::stack_size;
friend activity::MailboxImpl;
public:
- ActorImpl(std::string name, s4u::Host* host, aid_t ppid);
+ ActorImpl(const std::string& name, s4u::Host* host, aid_t ppid);
ActorImpl(const ActorImpl&) = delete;
ActorImpl& operator=(const ActorImpl&) = delete;
~ActorImpl();
class WifiLinkImpl : public StandardLinkImpl {
/** @brief Hold every rates association between host and links (host name, rates id) */
- std::map<std::string, int> host_rates_;
+ std::map<std::string, int, std::less<>> host_rates_;
/** @brief A link can have several bandwidths attached to it (mostly use by wifi model) */
std::vector<Metric> bandwidths_;
#include "xbt/base.h"
#include <memory>
-#include <set>
namespace simgrid::mc {
*/
class ModelChecker {
CheckerSide checker_side_;
- /** String pool for host names */
- std::set<std::string, std::less<>> hostnames_;
// This is the parent snapshot of the current state:
PageStore page_store_{500};
std::unique_ptr<RemoteProcess> remote_process_;
Channel& channel() { return checker_side_.get_channel(); }
PageStore& page_store() { return page_store_; }
- std::string const& get_host_name(const char* hostname) { return *this->hostnames_.insert(hostname).first; }
-
void start();
void shutdown();
void resume();
void AppSide::handle_deadlock_check(const s_mc_message_t*) const
{
- auto* engine = kernel::EngineImpl::get_instance();
+ const auto* engine = kernel::EngineImpl::get_instance();
const auto& actor_list = engine->get_actor_list();
bool deadlock = not actor_list.empty() && std::none_of(begin(actor_list), end(actor_list), [](const auto& kv) {
return mc::actor_is_enabled(kv.second);