qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] thread-win32: fix GetThreadContext() permanentl


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] thread-win32: fix GetThreadContext() permanently fails
Date: Tue, 23 Jun 2015 19:07:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

Am 23.06.2015 um 12:46 schrieb Paolo Bonzini:
On 23/06/2015 12:30, Peter Maydell wrote:
On 23 June 2015 at 10:55, Ян Завадовский <address@hidden> wrote:
On Tue, Jun 23, 2015 at 9:02 AM, Stefan Weil <address@hidden> wrote:
We should add an URL to reliable documentation which supports that
claim.
Unfortunately, MSDN says only "SuspendThread suspends the thread. It's
designed for debuggers. Don't use in applications.":
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686345(v=vs.85).aspx
And nothing more useful.
So when I found this piece of code with Suspend/Resume and failed GetContext
I did some googling.
And found this article:
http://blogs.msdn.com/b/oldnewthing/archive/2015/02/05/10591215.aspx
Personally I am happy to treat a Raymond Chen blog post as "reliable
documentation"...
Me too. :)

+1

Fabien, I wonder why nobody noticed that the current
code did not do what it was written for. As far as I see
the threads were created with the wrong options, so
GetThreadContext always failed and therefore was only
executed once, so there was no waiting for thread
suspension.

Removing the code would have given identical results.

Is that in an indicator that the SuspendThread is not
needed at all, as it was discussed in the other e-mails
here?

Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]