Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Activity refactoring
[simgrid.git] / examples / c / synchro-semaphore / synchro-semaphore.c
index 409a160a905a1a4afce9d02d0c4407121ab9624d..8e6de3ba21a38d5d00be08822c4f226f06f42f2b 100644 (file)
@@ -20,7 +20,7 @@ static void peer(int argc, char* argv[])
 {
   int i = 0;
   while (i < argc) {
-    double wait_time = xbt_str_parse_double(argv[i], "Invalid wait time: %s");
+    double wait_time = xbt_str_parse_double(argv[i], "Invalid wait time");
     i++;
     sg_actor_sleep_for(wait_time);
     XBT_INFO("Trying to acquire %d (%sblocking)", i, sg_sem_would_block(sem) ? "" : "not ");
@@ -33,7 +33,7 @@ static void peer(int argc, char* argv[])
     }
     XBT_INFO("Acquired %d", i);
 
-    wait_time = xbt_str_parse_double(argv[i], "Invalid wait time: %s");
+    wait_time = xbt_str_parse_double(argv[i], "Invalid wait time");
     i++;
     sg_actor_sleep_for(wait_time);
     XBT_INFO("Releasing %d", i);
@@ -56,8 +56,8 @@ int main(int argc, char* argv[])
   const char* aliceTimes[] = {"0", "1", "3", "5", "1", "2", "5", "0"};
   const char* bobTimes[]   = {"0.9", "1", "1", "2", "2", "0", "0", "5"};
 
-  sg_actor_create("Alice", h, peer, 8, aliceTimes);
-  sg_actor_create("Bob", h, peer, 8, bobTimes);
+  sg_actor_create_("Alice", h, peer, 8, aliceTimes);
+  sg_actor_create_("Bob", h, peer, 8, bobTimes);
 
   simgrid_run();
   sg_sem_destroy(sem);