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

2015-06-23 Thread Ян Завадовский
On Tue, Jun 23, 2015 at 12:49 PM, Fabien Chouteau wrote: > > Maybe we can, but the "while" will only loop when threads are running on > different CPU, so the other thread is already running and calling sleep > will not help I think. > What you think about this: diff --git a/cpus.c b/cpus.c index 8

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

2015-06-23 Thread Ян Завадовский
Hello. On Tue, Jun 23, 2015 at 9:02 AM, Stefan Weil wrote: > Am 22.06.2015 um 23:54 schrieb Zavadovsky Yan: > >> Calling SuspendThread() is not enough to suspend Win32 thread. >> We need to call GetThreadContext() after SuspendThread() >> to make sure that OS have really suspended target thread.