Coroutines in C

Peter da Silva peter at ficc.uu.net
Tue Aug 29 20:33:07 AEST 1989


In article <10861 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> In article <5899 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
> >If [simple setjmp] 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>.

You're right, I should have spelled that out. I sort of assumed that anyone
who had been following this discussion would figure that out... but of course
someone who was following the discussion wouldn't have asked the question in
the first place. I'll try to be clearer in the future and not assume that
people will glark stuff like that from context.
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter at ficc.uu.net, +1 713 274 5180. Fun: peter at sugar.hackercorp.com. `-_-'
"Just once I'd like to meet an alien menace that isn't immune to bullets"  'U`
   -- The Brigadier, Dr Who.



More information about the Comp.lang.c mailing list