Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
frame a concept of execution, that will become a s4u::Async
[simgrid.git] / teshsuite / surf / surf_usage / surf_usage.cpp
index 83c5c50..8aa09ec 100644 (file)
@@ -11,6 +11,7 @@
 #include "surf/surf.h"
 #include "surf/surfxml_parse.h" // for reset callback
 #include "src/surf/surf_interface.hpp"
+#include "src/surf/cpu_interface.hpp"
 
 #include "xbt/log.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test,
@@ -57,12 +58,12 @@ void test(char *platform)
   hostB = sg_host_by_name("Cpu B");
 
   /* Let's check that those two processors exist */
-  XBT_DEBUG("%s : %p", surf_cpu_name(hostA->p_cpu), hostA);
-  XBT_DEBUG("%s : %p", surf_cpu_name(hostB->p_cpu), hostB);
+  XBT_DEBUG("%s : %p", surf_cpu_name(hostA->pimpl_cpu), hostA);
+  XBT_DEBUG("%s : %p", surf_cpu_name(hostB->pimpl_cpu), hostB);
 
   /* Let's do something on it */
-  actionA = surf_host_execute(hostA, 1000.0);
-  actionB = surf_host_execute(hostB, 1000.0);
+  actionA = hostA->pimpl_cpu->execution_start(1000.0);
+  actionB = hostB->pimpl_cpu->execution_start(1000.0);
   actionC = surf_host_sleep(hostB, 7.32);
 
   /* Use whatever calling style you want... */