summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/coread.c
AgeCommit message (Collapse)Author
2023-07-20Moved examples to sub-directories. Added cotask1.c cotask2.c examples.tylov
2023-07-02Update in coroutine API. cco_yield, cco_await, cco_await_on, cco_block_on ↵Tyge Løvset
has changed. cco_final: renamed => cco_cleanup: Reverted i_retain template param back to => i_more.
2023-06-13Added cco_closue(Ret, Closure) to define coroutine closure.Tyge Løvset
Added back cco_await_on(child) calls.
2023-06-09Fixed issues with linking params i_implement, i_extern.Tyge Løvset
2023-05-26Minor addition to coroutine API.Tyge Løvset
2023-05-24coroutine.h:Tyge Løvset
- Renamed Liigo's coroutine macro cco(x) => cco_routine(x). - Removed cco_begin(x), cco_end() macros. Replaced by cco_routine(x). - Replaced csleep_ms() with csleep_us(), using select() which is portable. - Updated all coroutine examples.
2023-05-18add `cco` macro, block style coroutine definition, to replace cco_begin(co) ↵Liigo Zhuang
&& cco_end()
2023-05-09reverted cco_await_done => cco_await_at.Tyge Lovset
2023-05-04Updates in coroutines.h: No longer *required* with cco_final:, but only when ↵Tyge Løvset
no cleanup is needed.
2023-05-03Reverted from cco_await_with(promise, ret) to cco_await(promise, ret).Tyge Løvset
2023-05-02Improved coroutine.h, added new coro examples.Tyge Løvset
2023-03-27More RAII cleanup in examples. Also removed gauss1.c and new_deq.cTyge Løvset
2023-03-01Reverted example moves.Tyge Løvset
2023-03-01Moved algorithm examples to algo folder.Tyge Løvset
2023-02-28Final cleanups on corotines.Tyge Løvset
2023-02-27Let cco_end(value) return value. Should be last in function anyway.Tyge Løvset
Assume context always non-NULL when calling cco_alive(context).
2023-02-26Addition to coroutine.h. Allow dynamic allocation of context.Tyge Løvset
2023-02-25Some clever adjustment to coroutine state.Tyge Løvset
2023-02-25Improved coread.c example a lot.Tyge Løvset
2023-02-25Renamed algo/ccoro.h => algo/coroutine.h. Using cco_ as prefix. Changed ↵Tyge Løvset
ccoro_execute(c) => cco_begin(c); ... cco_end(); (was required).
2023-02-23Replaced coroutine.h with ccoro.h. Stackbased only.Tyge Løvset
2023-02-23Renamed cco.h to coroutine.hTyge Løvset
2023-02-22Renamed ccontext => cco_handleTyge Løvset
2023-02-22Added coroutines, based upon Simon Tatham's famous implementation. This ↵Tyge Løvset
version is much improved, but uses the same basic mechanisms.