X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd77edf75909515d711d8be2c27e61e23a72ba74..1242154344890b641971b49954a6cd0d49fe037b:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index e1c5097573..8d5788d0ec 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -22,7 +22,6 @@ int MSG_HOST_LEVEL; int SIMIX_HOST_LEVEL; -int ROUTING_HOST_LEVEL; int USER_HOST_LEVEL; namespace simgrid { @@ -44,6 +43,7 @@ Host::Host(const char* name) Host::~Host() { delete pimpl_cpu; + delete pimpl_netcard; delete mounts; } @@ -117,6 +117,18 @@ xbt_dict_t Host::properties() { }); } +/** Retrieve the property value (or NULL if not set) */ +const char*Host::property(const char*key) { + simgrid::surf::HostImpl* surf_host = this->extension(); + return surf_host->getProperty(key); +} +void Host::setProperty(const char*key, const char *value){ + simgrid::simix::kernel([&] { + simgrid::surf::HostImpl* surf_host = this->extension(); + surf_host->setProperty(key,value); + }); +} + /** Get the processes attached to the host */ xbt_swag_t Host::processes() {