return pimpl_->get_cmdline();
}
-void Engine::shutdown() // XBT_ATTRIB_DEPRECATED_v335
-{
- delete Engine::instance_;
-}
-
double Engine::get_clock()
{
if (MC_is_active() || MC_record_replay_is_active()) {
ss << "<?xml version='1.0'?>\n";
ss << "<!DOCTYPE platform SYSTEM \"https://simgrid.org/simgrid.dtd\">\n";
ss << "<platform version=\"" << version << "\">\n";
- ss << "<AS id=\"" << get_netzone_root()->get_name() << "\" routing=\"Full\">\n";
+ ss << "<zone id=\"" << get_netzone_root()->get_name() << "\" routing=\"Full\">\n";
flatify_hosts(*this, ss);
flatify_links(*this, ss);
flatify_routes(*this, ss);
- ss << "</AS>\n";
+ ss << "</zone>\n";
ss << "</platform>\n";
return ss.str();
}
return mbox->get_iface();
}
+MessageQueue* Engine::message_queue_by_name_or_create(const std::string& name) const
+{
+ /* two actors may have pushed the same mbox_create simcall at the same time */
+ kernel::activity::MessageQueueImpl* queue = kernel::actor::simcall_answered([&name, this] {
+ auto [m, inserted] = pimpl_->mqueues_.try_emplace(name, nullptr);
+ if (inserted) {
+ m->second = new kernel::activity::MessageQueueImpl(name);
+ XBT_DEBUG("Creating a message queue at %p with name %s", m->second, name.c_str());
+ }
+ return m->second;
+ });
+ return queue->get_iface();
+}
+
/** @brief Returns the amount of links in the platform */
size_t Engine::get_link_count() const
{