Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
introduce sg_actor_create and use it in C examples
[simgrid.git] / examples / c / app-token-ring / app-token-ring.c
index 275b4dc..d7cf8cd 100644 (file)
@@ -64,8 +64,7 @@ int main(int argc, char* argv[])
   for (size_t i = 0; i < host_count; i++) {
     /* - Give a unique rank to each host and create a @ref relay_runner process on each */
     char* name_host  = bprintf("%zu", i);
-    sg_actor_t actor = sg_actor_init(name_host, hosts[i]);
-    sg_actor_start(actor, relay_runner, 0, NULL);
+    sg_actor_create(name_host, hosts[i], relay_runner, 0, NULL);
     free(name_host);
   }
   free(hosts);