X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cb4883c820911c89e8edc37d1076bf1c1e6f0f51..a15797ea55151ddfdbae48147e74159efe01b411:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index d28b2a6743..5020d7dc8b 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -15,7 +15,7 @@ #include "xbt/log.h" #include "src/msg/msg_private.h" #include "src/simix/smx_process_private.h" -#include "src/simix/smx_private.hpp" +#include "src/simix/smx_private.h" #include "src/surf/cpu_interface.hpp" #include "simgrid/s4u/host.hpp" #include "simgrid/s4u/storage.hpp" @@ -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() {