MCPcopy Create free account
hub / github.com/codr7/hacktical-c / consumer

Function consumer

task/tests.c:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25static 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
40void task_tests() {
41 struct hc_task_list tl;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected