| 18 | } |
| 19 | |
| 20 | void hc_task_list_run(const struct hc_task_list *tl) { |
| 21 | bool all_done = false; |
| 22 | |
| 23 | while (!all_done) { |
| 24 | all_done = true; |
| 25 | |
| 26 | hc_list_do(&tl->tasks, i) { |
| 27 | struct hc_task *t = hc_baseof(i, struct hc_task, list); |
| 28 | |
| 29 | if (!t->done) { |
| 30 | t->body(t); |
| 31 | all_done = false; |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | } |