Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use a typed extension for simix::Host
[simgrid.git] / src / s4u / s4u_host.cpp
index 0d3cad4..a75aea9 100644 (file)
@@ -21,7 +21,6 @@
 #include "simgrid/s4u/storage.hpp"
 
 int MSG_HOST_LEVEL = -1;
-int SIMIX_HOST_LEVEL = -1;
 int USER_HOST_LEVEL = -1;
 
 namespace simgrid {
@@ -133,7 +132,7 @@ void Host::setProperty(const char*key, const char *value){
 xbt_swag_t Host::processes()
 {
   return simgrid::simix::kernelImmediate([&]() {
-    return ((smx_host_priv_t)this->extension(SIMIX_HOST_LEVEL))->process_list;
+    return this->extension<simgrid::simix::Host>()->process_list;
   });
 }