On 02/07/2012 05:06 PM, Alex Barcelo wrote:
Yes, I agree. But makecontext and swapcontext are not OK for my project (mainly because makecontext and swapcontext are not supported by qemu under PPC) so I was looking for alternatives. My best shot at the moment is using sigaltstack, if it works I will post a patch for coroutines using sigaltstack, which is also quite portable (GNU Portable Thread can use both, so I was trying to copy its functionality).
If you get stuck you can use the coroutine-fix branch at git://github.com/bonzini/qemu.git
Paolo