qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] main-loop: Fix SetEvent() on uninitialized hand


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] main-loop: Fix SetEvent() on uninitialized handle on win32
Date: Sat, 21 Jan 2012 08:49:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/21/2012 02:08 AM, Michael Roth wrote:
The __attribute__((constructor)) init_main_loop() automatically get
called if qemu-tool.o is linked in. On win32, this leads to
a qemu_notify_event() call which attempts to SetEvent() on a HANDLE that
won't be initialized until qemu_init_main_loop() is manually called,
breaking qemu-tools.o programs on Windows at runtime.

This patch checks for an initialized event handle before attempting to
set it, which is analoguous to how we deal with an unitialized
io_thread_fd in the posix implementation.

Signed-off-by: Michael Roth<address@hidden>

Reviewed-by: Paolo Bonzini <address@hidden>

Paolo




reply via email to

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