#include <unordered_map>
#include "xbt/Extendable.hpp"
-#include "xbt/dict.h"
#include "xbt/signal.hpp"
#include "xbt/string.hpp"
#include "xbt/swag.h"
boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(activity);
xbt_assert(comm->mbox == this, "Comm %p is in mailbox %s, not mailbox %s", comm.get(),
- (comm->mbox ? comm->mbox->name_.c_str() : "(null)"), this->name_.c_str());
+ (comm->mbox ? comm->mbox->name_ : "(null)"), this->name_);
comm->mbox = nullptr;
for (auto it = this->comm_queue.begin(); it != this->comm_queue.end(); it++)
if (*it == comm) {
this->comm_queue.erase(it);
return;
}
- xbt_die("Comm %p not found in mailbox %s", comm.get(), this->name_.c_str());
+ xbt_die("Comm %p not found in mailbox %s", comm.get(), this->name_);
}
}
}
class MailboxImpl {
explicit MailboxImpl(const char* name)
- : piface_(this), name_(name), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE)
+ : piface_(this), name_(xbt_strdup(name)), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE)
{
}
public:
- ~MailboxImpl() = default;
+ ~MailboxImpl() { xbt_free(name_); }
static MailboxImpl* byNameOrNull(const char* name);
static MailboxImpl* byNameOrCreate(const char* name);
void push(activity::CommImplPtr comm);
void remove(smx_activity_t activity);
simgrid::s4u::Mailbox piface_; // Our interface
- std::string name_;
+ char* name_;
simgrid::simix::ActorImplPtr permanent_receiver; // process which the mailbox is attached to
boost::circular_buffer_space_optimized<smx_activity_t> comm_queue;
const char* Mailbox::getName()
{
- return pimpl_->name_.c_str();
+ return pimpl_->name_;
}
MailboxPtr Mailbox::byName(const char*name)
#include "private.h"
#include "private.hpp"
-#include "xbt/dict.h"
-#include "xbt/ex.hpp"
#include <cerrno>
#include <sys/types.h>
#ifndef SURF_SURFXML_PARSE_H
#define SURF_SURFXML_PARSE_H
-#include <xbt/dict.h>
#include <xbt/function_types.h>
#include <xbt/misc.h>
#include <xbt/signal.hpp>
#include "src/instr/instr_private.h" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-#include "xbt/dict.h"
#include "xbt/log.h"
#include "xbt/misc.h"
#include "xbt/str.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
-
/* Trace related stuff */
XBT_PRIVATE std::unordered_map<std::string, tmgr_trace_t> traces_set_list;
XBT_PRIVATE std::unordered_map<std::string, std::string> trace_connect_list_host_avail;