On 05/13/2011 11:26 AM, Stefan Hajnoczi wrote: > This coroutines implementation is based on the gtk-vnc implementation > written by Anthony Liguori but it has been > significantly rewritten by Kevin Wolf to use > setjmp()/longjmp() instead of the more expensive swapcontext(). Since in the future we'll have at least three implementations of coroutines (ucontext, win32 fibers, threads) can you squash in something like the attached to allow "subclassing" of coroutines using DO_UPCAST)? Resolving conflicts with 4/4 should be trivial (Sorry for not doing my homework completely; I started describing in English what I had in mind, but it was too much of a mouthful). Paolo