diff options
| author | Tyge Lovset <[email protected]> | 2023-05-09 04:40:24 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-05-09 04:40:24 +0200 |
| commit | 99d94309f31f082b505180d2cb7c1c6c2215e9f0 (patch) | |
| tree | b4dd5aec779eff711e5e3fea0d356301c3969cd2 /misc/examples/scheduler.c | |
| parent | 2f11c7cf36690a1493344189b6a011c26ee58a9b (diff) | |
| download | STC-modified-99d94309f31f082b505180d2cb7c1c6c2215e9f0.tar.gz STC-modified-99d94309f31f082b505180d2cb7c1c6c2215e9f0.zip | |
reverted cco_await_done => cco_await_at.
Diffstat (limited to 'misc/examples/scheduler.c')
| -rw-r--r-- | misc/examples/scheduler.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/examples/scheduler.c b/misc/examples/scheduler.c index 04107d5e..bad5201b 100644 --- a/misc/examples/scheduler.c +++ b/misc/examples/scheduler.c @@ -25,7 +25,7 @@ static bool schedule(Scheduler* sched) return !Scheduler_empty(sched); } -static bool resume_task(const struct Task* task) +static bool push_task(const struct Task* task) { Scheduler_push_back(task->sched, *task); return false; @@ -36,11 +36,11 @@ static bool taskA(struct Task* task) { cco_begin(task); puts("Hello, from task A"); - cco_yield(resume_task(task)); + cco_yield(push_task(task)); puts("A is back doing work"); - cco_yield(resume_task(task)); + cco_yield(push_task(task)); puts("A is back doing more work"); - cco_yield(resume_task(task)); + cco_yield(push_task(task)); puts("A is back doing even more work"); cco_end(true); } @@ -49,9 +49,9 @@ static bool taskB(struct Task* task) { cco_begin(task); puts("Hello, from task B"); - cco_yield(resume_task(task)); + cco_yield(push_task(task)); puts("B is back doing work"); - cco_yield(resume_task(task)); + cco_yield(push_task(task)); puts("B is back doing more work"); cco_end(true); } |
