A coroutine library written in and for C. Different kinds of Interfaces available: Posix thread style(old version), Lua coroutine style(CPS) based on CloudWu tiny coroutines library(ezco.v.0.0.1.*), Erlang process style(Actor Model, on future version, not finished yet).
Anyone interested in this tiny lib could modify the code to make it 64-bit as s/he likes. Or port it to embedded systems using ARM assembly language instead of Intel X86/X64. The basic idea is the same: use 'struct' to save task context ( stack's info and some registers' values ) and JMP instruction to switch tasks. Please refer to the last chapter in book 'C Interfaces and Implementations' for SPARC, MIPS and ALPHA versions of pure-assembly-language-implemented switch function.
cnblogs link: cnblogs in chinese