Whoops. I had the mistaken belief that Qemu already used pthreads.

So, the makefiles and configure script need to handle pthreads somehow (especially on windows.) Pthreads-w32 is refusing to 'make install' itself into standard lib and include directories. Unlike SDL, there is no 'pthread-config' to tell us where it lives.

Suppose that on Windows, we tell people to unpack the pthread distribution within the qemu tree. Qemu's configure script could find it, build a static pthread library, and link that into Qemu.

This removes the need for the user to:
 * read pthreads-w32 documents,
 * issue a separate build command for pthreads-w32,
* get confused before realizing that pthreads-w32 doesn't really support 'make install',
 * hack at qemu until it points to the uninstalled pthreads dir,
 * copy the pthreads DLL into c:\windows

I'll look at adding this to the configure script.

-john



Christian MICHON wrote:
I managed to make it work (qemu+non blocking IO on windows host),
with a rough estimation of 10% speed increase at the early stage of
windows setup. I expect more once windows installs itself in true
multitasking mode. :)

What you need to do is:
- download pthreads-w32-2-6-0-release.tar.gz and compile it from scratch
 (make clean GC)
- you also need to add the following lines inside block.c (usleep is not
present in win32/mingw32)

 #ifdef WIN32
void usleep(unsigned long usec)
{
    Sleep(usec/1000);
}
#endif

- you need to update the link to include "-lpthreadGC2 -lz", and
keep a copy of the pthreadGC2.dll where qemu.exe will be
(to pu it just in from of "-lz" is just my personal suggestion)

HIH,
Christian

On 10/3/05, Elefterios Stamatogiannakis <[EMAIL PROTECTED]> wrote:

With which pthreads library have you compiled it under windows?

I've tried it with the one here:

ftp://sources.redhat.com/pub/pthreads-win32/

but it didn't compile.

teris.



_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel




_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to