Coroutines in C

Peter da Silva peter at ficc.uu.net
Fri Aug 18 23:02:34 AEST 1989


In article <2151 at netcom.UUCP>, hinton at netcom.UUCP (Greg Hinton) writes:
> In article <5663 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
> >Isn't it about time that there was some effort made to provide a standard
> >coroutine library in C.
> >These routines together would allow the portable implementation of threads
> >on a wide variety of systems, if they became widespread.

> Isn't this precisely what the language Concurrent C attempts?

Concurrent C is a different language. I can't take a couple of pages
of code and use them to implement threads for a C compiler and library
I don't have the source to. In many C compilers I wouldn't even need
to write any assembly code, since setjmp/longjmp can be used to implement
the context switch.

This is not nearly as ambitious a project as Concurrent C.
-- 
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. `-_-'
"Optimization is not some mystical state of grace, it is an intricate act   U
   of human labor which carries real costs and real risks." -- Tom Neff



More information about the Comp.lang.c mailing list