Continuations/coroutines in UNIX98 standard

James Knight <[email protected]> Sun, 6 Oct 2002 22:26:31 -0400
Newsgroups gmane.comp.lang.goo.general
Message-ID <[email protected]>
By complete accident I happened upon the documentation for 
getcontext/setcontext/makecontext/swapcontext. It appears to be a 
UNIX98 standard way of creating continuations in C. The only gotcha I 
can find is that you need to allocate the alternate stacks yourself, 
but that isn't too big a deal, as you should just be able to mmap some 
memory to get it lazily allocated. Might be nifty to see whether it 
works with/for GOO. I'm not sure how widely implemented it is but it at 
least exists in linux and solaris.

http://www.gnu.org/manual/glibc-2.2.3/html_chapter/libc_23.html

james