On Wed, May 11, 2011 at 03:45:39PM +0200, Paolo Bonzini wrote: > On 05/11/2011 03:05 PM, Anthony Liguori wrote: > >> > >>A very slow way, too (on Windows at least if you use qemu_cond...). > > > >That doesn't mean you can't do a fiber implementation for Windows... but > >having a highly portable fallback is a good thing. > > I agree but where would you place it, since QEMU is only portable to > POSIX and Windows? > > osdep-$(CONFIG_POSIX) += coroutine-posix.c > osdep-$(CONFIG_WIN32) += coroutine-win32.c > osdep-??? += coroutine-fallback.c
NetBSD forbids the use of 'makecontext' in any application which also links to libpthread.so[1]. We used makecontext in GTK-VNC's coroutines and got random crashes in threaded apps running on NetBSD. So for NetBSD we tell people to use the thread based coroutines instead. So at least one POSIX platform will need a different impl. Regards, Daniel [1] http://www.eila.univ-paris-diderot.fr/cgi-bin/man.cgi?swapcontext+3 -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|