X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2075838c45a56f2710e5e62ef3ceb7c67add6a31..c527cde5e1ee1bfe22dd33b3bbb77aaae8bcdcb1:/src/surf/HostImpl.cpp diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index 2408c687cb..b05ca954c3 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -98,23 +98,15 @@ Action* HostModel::executeParallelTask(int host_nb, simgrid::s4u::Host** host_li /************ * Resource * ************/ -HostImpl::HostImpl(simgrid::surf::HostModel* model, const char* name, xbt_dynar_t storage) - : PropertyHolder(nullptr), storage_(storage) +HostImpl::HostImpl(s4u::Host* host, xbt_dynar_t storage) : PropertyHolder(nullptr), storage_(storage), piface_(host) { + piface_->pimpl_ = this; params_.ramsize = 0; } /** @brief use destroy() instead of this destructor */ HostImpl::~HostImpl() = default; -void HostImpl::attach(simgrid::s4u::Host* host) -{ - if (piface_ != nullptr) - xbt_die("Already attached to host %s", host->name().c_str()); - host->pimpl_ = this; - piface_ = host; -} - simgrid::surf::Storage *HostImpl::findStorageOnMountList(const char* mount) { simgrid::surf::Storage *st = nullptr;