mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
* MemoryRegionCache revert
* glib optimization workaround * fix "info lapic" segfault on isapc * fix QIOChannel memory leak -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQExBAABCAAbBQJY4oOMFBxwYm9uemluaUByZWRoYXQuY29tAAoJEL/70l94x66D AsIH/i52nJw41utJCs5AevnQyqNs9RnyMkZLHiVoi6a+pdJqX+0mCw8gV/5FsbPZ dtyt1tEuYBSu72adr+/ExE4aIEjwzeyRmnUdOkB+iYPxirHKuf4K/JTuLuvMtaQQ Tqj+FU5tx3wx0jlGOm5A7pzjZ680JUex+oaz3d1bZziv3zCyFCIgiZ2m2UAaaPQe fsd3fksJvc0gKOUKmdLUpu2m/xP3hAQAfQ4P/ozOfbVh9V2CVNaQ/cl935tNtdFK aYN3KleW3/ovb+YSexeNoW7QQH/3ZsjronCW5OmbF4FgHoeoV8MUROfNgu1S2bRU Bne9K/6boPzhD8NDEuSy8SXvf7s= =EdXr -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging * MemoryRegionCache revert * glib optimization workaround * fix "info lapic" segfault on isapc * fix QIOChannel memory leak # gpg: Signature made Mon 03 Apr 2017 18:17:00 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: main-loop: Acquire main_context lock around os_host_main_loop_wait. exec: revert MemoryRegionCache nbd: fix memory leak on socket_connect failed ipmi: Fix macro issues target-i386: fix "info lapic" segfault on isapc iscsi: drop unused IscsiAIOCB.qiov field Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
87cc4c6102
7 changed files with 43 additions and 82 deletions
|
@ -218,9 +218,12 @@ static void glib_pollfds_poll(void)
|
|||
|
||||
static int os_host_main_loop_wait(int64_t timeout)
|
||||
{
|
||||
GMainContext *context = g_main_context_default();
|
||||
int ret;
|
||||
static int spin_counter;
|
||||
|
||||
g_main_context_acquire(context);
|
||||
|
||||
glib_pollfds_fill(&timeout);
|
||||
|
||||
/* If the I/O thread is very busy or we are incorrectly busy waiting in
|
||||
|
@ -256,6 +259,9 @@ static int os_host_main_loop_wait(int64_t timeout)
|
|||
}
|
||||
|
||||
glib_pollfds_poll();
|
||||
|
||||
g_main_context_release(context);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
|
@ -412,12 +418,15 @@ static int os_host_main_loop_wait(int64_t timeout)
|
|||
fd_set rfds, wfds, xfds;
|
||||
int nfds;
|
||||
|
||||
g_main_context_acquire(context);
|
||||
|
||||
/* XXX: need to suppress polling by better using win32 events */
|
||||
ret = 0;
|
||||
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
|
||||
ret |= pe->func(pe->opaque);
|
||||
}
|
||||
if (ret != 0) {
|
||||
g_main_context_release(context);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -472,6 +481,8 @@ static int os_host_main_loop_wait(int64_t timeout)
|
|||
g_main_context_dispatch(context);
|
||||
}
|
||||
|
||||
g_main_context_release(context);
|
||||
|
||||
return select_ret || g_poll_ret;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue