Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
C bindings of ActivitySet, along with 4 examples
[simgrid.git] / examples / c / exec-waitany / exec-waitany.c
index e65ade7..2dd9d86 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -48,7 +48,7 @@ static void worker(int argc, char* argv[])
       pos = sg_exec_wait_any(pending_execs, pending_execs_count);
 
     if (pos < 0) {
-      XBT_INFO("Do not wait any longer for an activity");
+      XBT_INFO("Do not wait any longer for an activity (timeout received)");
       pending_execs_count = 0;
     } else {
       XBT_INFO("Activity at position %zd is complete", pos);
@@ -58,7 +58,7 @@ static void worker(int argc, char* argv[])
     XBT_INFO("%d activities remain pending", pending_execs_count);
   }
 
-  free(pending_execs);
+  xbt_free(pending_execs);
 }
 
 int main(int argc, char* argv[])