On Tue, May 24, 2011 at 08:37:50PM +0100, Jamie Lokier wrote:
Thanks, I read about that but didn't try to implement special cases
because I don't have relevant OSes here to test against.
My current plan is to try using sigaltstack(2) instead of
makecontext()/swapcontext() as a hack since OpenBSD doesn't have
makecontext()/swapcontext().
TBH I'm almost at the stage where I think we should just use threads
and/or async callbacks, as appropriate. Hopefully I'll be able to cook
up a reasonably portable implementation of coroutines though, because
the prospect of having to go fully threaded or do async callbacks isn't
attractive in many cases.