[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] win32: replace custom mutex and condition varia
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH] win32: replace custom mutex and condition variable with native primitives |
Date: |
Mon, 3 Apr 2017 16:20:16 +0200 |
On Fri, 24 Mar 2017 15:01:41 -0700
Andrew Baumann <address@hidden> wrote:
> From: Andrey Shedel <address@hidden>
>
> 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 <address@hidden>
> ---
> 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
address@hidden'). I should probably take that as a
trigger to update that installation ;), but wanted to confirm that this
is expected.
- Re: [Qemu-devel] [PATCH] win32: replace custom mutex and condition variable with native primitives,
Cornelia Huck <=