[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Continuations/coroutines in UNIX98 standard
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