Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use cat+here document, instead of non-portable echo -e.
[simgrid.git] / examples / simdag / simdag_trace.c
index b05e5fb..a39a9b8 100644 (file)
@@ -62,9 +62,9 @@ int main(int argc, char **argv)
   TRACE_category ("taskA");
   TRACE_category ("taskB");
   TRACE_category ("taskC");
-  TRACE_sd_set_task_category (taskA, "taskA");
-  TRACE_sd_set_task_category (taskB, "taskB");
-  TRACE_sd_set_task_category (taskC, "taskC");
+  SD_task_set_category (taskA, "taskA");
+  SD_task_set_category (taskB, "taskB");
+  SD_task_set_category (taskC, "taskC");
 
   /* if everything is ok, no exception is forwarded or rethrown by main() */
 
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
                    &(computation_amount[1]), SD_SCHED_NO_COST, rate);
 
   /* let's launch the simulation! */
-  while (xbt_dynar_length(changed_tasks = SD_simulate(-1.0)) > 0) {
+  while (!xbt_dynar_is_empty(changed_tasks = SD_simulate(-1.0))) {
     for (i = 0; i < 2; i++) {
       task = SD_workstation_get_current_task(workstations[i]);
       if (task)