Patchwork event notifier: Fix setup for win32

login
register
mail settings
Submitter Jan Kiszka
Date Nov. 22, 2012, 7:56 p.m.
Message ID <50AE835B.1020706@siemens.com>
Download mbox | patch
Permalink /patch/201174/
State New
Headers show

Comments

Jan Kiszka - Nov. 22, 2012, 7:56 p.m.
The event notifier state is only reset by test_and_clear. But we created
the windows event object with auto-reset, which subtly swallowed events.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Grr, the last place I looked at after hours of debugging...

 event_notifier-win32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Stefan Hajnoczi - Nov. 23, 2012, 7:08 a.m.
On Thu, Nov 22, 2012 at 08:56:11PM +0100, Jan Kiszka wrote:
> The event notifier state is only reset by test_and_clear. But we created
> the windows event object with auto-reset, which subtly swallowed events.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Grr, the last place I looked at after hours of debugging...
> 
>  event_notifier-win32.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

This should be in QEMU 1.3.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Paolo Bonzini - Nov. 28, 2012, 11:40 a.m.
Il 23/11/2012 08:08, Stefan Hajnoczi ha scritto:
> On Thu, Nov 22, 2012 at 08:56:11PM +0100, Jan Kiszka wrote:
>> The event notifier state is only reset by test_and_clear. But we created
>> the windows event object with auto-reset, which subtly swallowed events.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> Grr, the last place I looked at after hours of debugging...
>>
>>  event_notifier-win32.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> This should be in QEMU 1.3.
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Anthony, the patch is at

http://article.gmane.org/gmane.comp.emulators.qemu/181608/raw

Please apply it for -rc2.

Paolo
Anthony Liguori - Nov. 28, 2012, 9:37 p.m.
Jan Kiszka <jan.kiszka@siemens.com> writes:

> The event notifier state is only reset by test_and_clear. But we created
> the windows event object with auto-reset, which subtly swallowed events.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Applied. Thanks.

Regards,

Anthony Liguori

> ---
>
> Grr, the last place I looked at after hours of debugging...
>
>  event_notifier-win32.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/event_notifier-win32.c b/event_notifier-win32.c
> index c723dad..4ed21c2 100644
> --- a/event_notifier-win32.c
> +++ b/event_notifier-win32.c
> @@ -16,7 +16,7 @@
>  
>  int event_notifier_init(EventNotifier *e, int active)
>  {
> -    e->event = CreateEvent(NULL, FALSE, FALSE, NULL);
> +    e->event = CreateEvent(NULL, TRUE, FALSE, NULL);
>      assert(e->event);
>      return 0;
>  }
> -- 
> 1.7.3.4

Patch

diff --git a/event_notifier-win32.c b/event_notifier-win32.c
index c723dad..4ed21c2 100644
--- a/event_notifier-win32.c
+++ b/event_notifier-win32.c
@@ -16,7 +16,7 @@ 
 
 int event_notifier_init(EventNotifier *e, int active)
 {
-    e->event = CreateEvent(NULL, FALSE, FALSE, NULL);
+    e->event = CreateEvent(NULL, TRUE, FALSE, NULL);
     assert(e->event);
     return 0;
 }