summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/coroutines/coroutines.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/coroutines/coroutines.c')
-rw-r--r--misc/examples/coroutines/coroutines.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/coroutines/coroutines.c b/misc/examples/coroutines/coroutines.c
index 489c3ed6..faeb71f6 100644
--- a/misc/examples/coroutines/coroutines.c
+++ b/misc/examples/coroutines/coroutines.c
@@ -84,13 +84,13 @@ struct combined {
int combined(struct combined* g) {
cco_routine(g) {
- cco_call_await(prime(&g->prm));
- cco_call_await(fibonacci(&g->fib));
+ cco_await_call(prime(&g->prm));
+ cco_await_call(fibonacci(&g->fib));
// Reuse the g->prm context and extend the count:
g->prm.count = 8, g->prm.result += 2;
cco_reset(&g->prm);
- cco_call_await(prime(&g->prm));
+ cco_await_call(prime(&g->prm));
cco_cleanup:
puts("final combined");
@@ -103,7 +103,7 @@ int main(void)
struct combined c = {.prm={.count=8}, .fib={14}};
int res;
- cco_call_blocking(combined(&c), &res) {
+ cco_blocking_call(res = combined(&c)) {
if (res == CCO_YIELD)
printf("Prime(%d)=%lld, Fib(%d)=%lld\n",
c.prm.idx, c.prm.result,