| 23 | } |
| 24 | |
| 25 | static void consumer(struct hc_task *task) { |
| 26 | int *value = hc_baseof(task, struct my_task, task)->value; |
| 27 | |
| 28 | switch (task->state) { |
| 29 | case 0: |
| 30 | assert(*value == 1); |
| 31 | (*value)++; |
| 32 | hc_task_yield(task); |
| 33 | assert(*value == 3); |
| 34 | (*value)++; |
| 35 | } |
| 36 | |
| 37 | task->done = true; |
| 38 | } |
| 39 | |
| 40 | void task_tests() { |
| 41 | struct hc_task_list tl; |
nothing calls this directly
no outgoing calls
no test coverage detected