From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Andrew Baumann <Andrew.Baumann@microsoft.com>
Cc: qemu-devel@nongnu.org, Andrey Shedel <ashedel@microsoft.com>,
Stefan Weil <sw@weilnetz.de>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] win32: replace custom mutex and condition variable with native primitives
Date: Mon, 3 Apr 2017 16:20:16 +0200 [thread overview]
Message-ID: <20170403162016.6c033dd8.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20170324220141.10104-1-Andrew.Baumann@microsoft.com>
On Fri, 24 Mar 2017 15:01:41 -0700
Andrew Baumann <Andrew.Baumann@microsoft.com> wrote:
> From: Andrey Shedel <ashedel@microsoft.com>
>
> The multithreaded TCG implementation exposed deadlocks in the win32
> condition variables: as implemented, qemu_cond_broadcast waited on
> receivers, whereas the pthreads API it was intended to emulate does
> not. This was causing a deadlock because broadcast was called while
> holding the IO lock, as well as all possible waiters blocked on the
> same lock.
>
> This patch replaces all the custom synchronisation code for mutexes
> and condition variables with native Windows primitives (SRWlocks and
> condition variables) with the same semantics as their POSIX
> equivalents. To enable that, it requires a Windows Vista or newer host
> OS.
>
> [AB: edited commit message]
> Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com>
> ---
> The major implication of this patch is that it drops support for
> pre-Vista versions of Windows. However, those OSes are past their end
> of life, and other OSS projects have dropped support. e.g.; the last
> Cygwin release supporting XP was in Jun 2016. It doesn't seem like a
> good tradeoff to invest effort in fixing broken code needed to support
> them, so hopefully this isn't too controversial.
Just a quick question:
I noticed that this breaks builds on an old fc20-based installation I
run some mingw cross builds on (getting an undefined reference to
`_imp__TryAcquireSRWLockExclusive@4'). I should probably take that as a
trigger to update that installation ;), but wanted to confirm that this
is expected.
next prev parent reply other threads:[~2017-04-03 14:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 22:01 [Qemu-devel] [PATCH] win32: replace custom mutex and condition variable with native primitives Andrew Baumann
2017-03-24 22:25 ` Paolo Bonzini
2017-03-24 22:28 ` Paolo Bonzini
2017-03-24 23:14 ` Andrew Baumann
2017-03-25 10:14 ` Paolo Bonzini
2017-03-25 17:43 ` Andrey Shedel
2017-03-24 22:30 ` Eric Blake
2017-04-03 14:20 ` Cornelia Huck [this message]
2017-04-03 18:12 ` Andrew Baumann
2017-04-04 6:35 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403162016.6c033dd8.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=Andrew.Baumann@microsoft.com \
--cc=ashedel@microsoft.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.