]> AND Public Git Repository - simgrid.git/blobdiff - examples/c/energy-exec-ptask/energy-exec-ptask.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar with a few const
[simgrid.git] / examples / c / energy-exec-ptask / energy-exec-ptask.c
index f4e98889729a34b7587b49f548a5c7a536fe8f6b..1f1a5dac57c61893ae96028d72181564eb7e4f7f 100644 (file)
@@ -90,13 +90,12 @@ int main(int argc, char* argv[])
 
   simgrid_load_platform(argv[1]);
 
-  /* Pick a process, no matter which, from the platform file */
+  /* Pick the first host from the platform file */
   sg_host_t* all_hosts = sg_host_list();
   sg_host_t first_host = all_hosts[0];
   free(all_hosts);
 
-  sg_actor_t actor = sg_actor_init("test", first_host);
-  sg_actor_start(actor, runner, 0, NULL);
+  sg_actor_create("test", first_host, runner, 0, NULL);
 
   simgrid_run();
   XBT_INFO("Simulation done.");