From: Frederic Suter Date: Thu, 3 Aug 2017 09:17:50 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_17~274 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a16ca05f4f79be7979ee3425e9bcae5633201d06?hp=90603961312ebafdfa7b490bc720baed0a69f76c Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 3c8691e4eb..30c932e298 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -11,7 +11,6 @@ #include #include "xbt/Extendable.hpp" -#include "xbt/dict.h" #include "xbt/signal.hpp" #include "xbt/string.hpp" #include "xbt/swag.h" diff --git a/src/kernel/activity/MailboxImpl.cpp b/src/kernel/activity/MailboxImpl.cpp index 330345b9b8..936b249718 100644 --- a/src/kernel/activity/MailboxImpl.cpp +++ b/src/kernel/activity/MailboxImpl.cpp @@ -73,14 +73,14 @@ void MailboxImpl::remove(smx_activity_t activity) boost::static_pointer_cast(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_); } } } diff --git a/src/kernel/activity/MailboxImpl.hpp b/src/kernel/activity/MailboxImpl.hpp index c3eb5d5589..8c4541d611 100644 --- a/src/kernel/activity/MailboxImpl.hpp +++ b/src/kernel/activity/MailboxImpl.hpp @@ -21,12 +21,12 @@ namespace activity { 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); @@ -34,7 +34,7 @@ public: 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 comm_queue; diff --git a/src/s4u/s4u_mailbox.cpp b/src/s4u/s4u_mailbox.cpp index cb5b0a03c2..245bd5334b 100644 --- a/src/s4u/s4u_mailbox.cpp +++ b/src/s4u/s4u_mailbox.cpp @@ -18,7 +18,7 @@ namespace s4u { const char* Mailbox::getName() { - return pimpl_->name_.c_str(); + return pimpl_->name_; } MailboxPtr Mailbox::byName(const char*name) diff --git a/src/smpi/internals/smpi_shared.cpp b/src/smpi/internals/smpi_shared.cpp index c2a55cd2f4..27bd066e70 100644 --- a/src/smpi/internals/smpi_shared.cpp +++ b/src/smpi/internals/smpi_shared.cpp @@ -38,8 +38,6 @@ #include "private.h" #include "private.hpp" -#include "xbt/dict.h" -#include "xbt/ex.hpp" #include #include diff --git a/src/surf/xml/platf.hpp b/src/surf/xml/platf.hpp index 3d29ba49af..e7343a0341 100644 --- a/src/surf/xml/platf.hpp +++ b/src/surf/xml/platf.hpp @@ -6,7 +6,6 @@ #ifndef SURF_SURFXML_PARSE_H #define SURF_SURFXML_PARSE_H -#include #include #include #include diff --git a/src/surf/xml/surfxml_parseplatf.cpp b/src/surf/xml/surfxml_parseplatf.cpp index 0e905d76dd..21d9a558dd 100644 --- a/src/surf/xml/surfxml_parseplatf.cpp +++ b/src/surf/xml/surfxml_parseplatf.cpp @@ -7,7 +7,6 @@ #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" @@ -27,7 +26,6 @@ extern "C" { XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse); - /* Trace related stuff */ XBT_PRIVATE std::unordered_map traces_set_list; XBT_PRIVATE std::unordered_map trace_connect_list_host_avail;