X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/92053543f27ea23194b2ef0d88e216e6f1fb02fd..d189e61368e9b88c5f1b80244897f9f8bd37e91c:/examples/simdag/sd_seq_access.c diff --git a/examples/simdag/sd_seq_access.c b/examples/simdag/sd_seq_access.c index ba45eb44b3..a0eb553e62 100644 --- a/examples/simdag/sd_seq_access.c +++ b/examples/simdag/sd_seq_access.c @@ -20,7 +20,7 @@ int main(int argc, char **argv) const SD_workstation_t *workstations; int kind; SD_task_t task, taskA, taskB, taskC; - SD_task_t *changed_tasks; + xbt_dynar_t changed_tasks; SD_workstation_t workstation_list[2]; double computation_amount[2]; double communication_amount[4] = { 0 }; @@ -86,7 +86,7 @@ int main(int argc, char **argv) &(computation_amount[1]), SD_SCHED_NO_COST, rate); /* let's launch the simulation! */ - while(*(changed_tasks = SD_simulate(-1.0))){ + while(xbt_dynar_length(changed_tasks = SD_simulate(-1.0))>0){ for(i=0;i<2; i++){ task = SD_workstation_get_current_task(workstations[i]); if (task) @@ -116,7 +116,7 @@ int main(int argc, char **argv) ERROR0("Shouldn't be here"); } } - xbt_free(changed_tasks); + xbt_dynar_free_container(&changed_tasks); } DEBUG0("Destroying tasks...");