History | View | Annotate | Download (12.5 kB)
w64: Fix type cast in os_host_main_loop_wait
Casting a pointer to an integer must use (DWORD_PTR) instead of (DWORD).This also matches the definition of 'fd' (gint for w32, gint64 for w64).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
main-loop: integrate glib sources for w32
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
main-loop: replace WaitForMultipleObjects with g_poll
On w32, glib implements g_poll using WaitForMultipleObjectsor MsgWaitForMultipleObjects. This means that we can simplifyour code by switching to g_poll, and at the same time prepare foradding back glib sources....
main-loop: interrupt wait when data arrives on a socket
Right now, the main loop is not interrupted when data arrives on asocket. To fix this, register each socket to interrupt the main loopwith WSAEventSelect. This does not replace select, it only communicates...
main loop: use msec-based timeout in glib_select_fill
The timeval-based timeout is not needed until we actually invoke select,so compute it only then. Also group the two calls that modify thetimeout, glib_select_fill and os_host_main_loop_wait.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
main-loop: disable fd_set-based glib integration under w32
Using select with glib pollfds is wrong under w32. Restrictthe code to the POSIX case.
main-loop: make qemu_event_handle static
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
main-loop: Fix SetEvent() on uninitialized handle on win32
The attribute((constructor)) init_main_loop() automatically getcalled if qemu-tool.o is linked in. On win32, this leads toa qemu_notify_event() call which attempts to SetEvent() on a HANDLE that...
main-loop: For tools, initialize timers as part of qemu_init_main_loop()
In some cases initializing the alarm timers can lead to non-negligableoverhead from programs that link against qemu-tool.o. At least,setting a max-resolution WinMM alarm timer via mm_start_timer() (the...
cleanup, save a syscall
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
main-loop: Add missing include file
stdint.h defines the POSIX data types and is neededfor MinGW-w64 (and maybe other hosts).
v2: Instead of adding stdint.h directly, qemu-common.h is nowincluded and duplicate include statements were removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
main-loop: create main-loop.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>