Coroutines in C

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Aug 29 03:59:55 AEST 1989


In article <5899 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>If this implementation is used, it should be possible to create
>a fake stack frame and register set in a jmp_buf and tranfer control to it
>using longjmp.

You need separate (non-overlapping) stacks, not just a stack frame.
Otherwise the coroutines will step on each other's <DELETED>.



More information about the Comp.lang.c mailing list