[libvirt] [PATCH 2/5] Remove windows thread implementation in favour of pthreads

Daniel P. Berrange berrange at redhat.com
Tue Jan 28 09:58:26 UTC 2014


On Mon, Jan 27, 2014 at 01:03:23PM -0700, Eric Blake wrote:
> On 01/23/2014 05:37 AM, Daniel P. Berrange wrote:
> > There are a number of pthreads impls available on Win32
> > these days, in particular the mingw64 project has a good
> > impl. Delete the native windows thread implementation and
> > rely on using pthreads everywhere.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> >  configure.ac                |  15 +-
> >  src/Makefile.am             |   4 -
> >  src/util/virthread.c        | 291 +++++++++++++++++++++++++++++++-
> >  src/util/virthread.h        |  41 ++++-
> >  src/util/virthreadpthread.c | 309 ----------------------------------
> >  src/util/virthreadpthread.h |  53 ------
> >  src/util/virthreadwin32.c   | 396 --------------------------------------------
> >  src/util/virthreadwin32.h   |  53 ------
> >  8 files changed, 329 insertions(+), 833 deletions(-)
> >  delete mode 100644 src/util/virthreadpthread.c
> >  delete mode 100644 src/util/virthreadpthread.h
> >  delete mode 100644 src/util/virthreadwin32.c
> >  delete mode 100644 src/util/virthreadwin32.h
> 
> This works for Fedora 20, but is it going to work on F19?  What about
> RHEL (or does RHEL not care about mingw builds?)  While I'm in favor of
> reducing the duplication, I'm wondering if we should still wait a bit
> longer before assuming winpthreads is reliably available for mingw.

Previous to winpthreads there was an alternative pthreads library
in mingw on Fedora. We didn't use that since its header files were
pretty evil and polluted the namespaces, but functionally it ought
to work with libvirt. So I think we're still ok.

Daniel
-- 
|: 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 :|




More information about the libvir-list mailing list