On Mon, 3 Apr 2017 18:12:34 +0000 Andrew Baumann <andrew.baum...@microsoft.com> wrote:
> > From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > > Sent: Monday, 3 April 2017 7:20 > > > > On Fri, 24 Mar 2017 15:01:41 -0700 > > Andrew Baumann <andrew.baum...@microsoft.com> wrote: > > > > > From: Andrey Shedel <ashe...@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.baum...@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. > > Yes, please try updating your mingw headers. I've done x64 cross-builds from > Ubuntu 16.04 (WSL) using mingw-w64 4.0.4. Yes, another, more modern cross-build setup works fine. I just was a bit surprised that this mingw setup did not go back to Vista level.