Commit 4870852c9e5c92d1e94afddbee607e578e226fae
1 parent
8edac960
qemu: introduce lock/unlock_iothread (Marcelo Tosatti)
Hook to allow iothread to drop the global mutex. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7244 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
vl.c
... | ... | @@ -3750,6 +3750,9 @@ void qemu_cpu_kick(void *env) |
3750 | 3750 | return; |
3751 | 3751 | } |
3752 | 3752 | |
3753 | +#define qemu_mutex_lock_iothread() do { } while (0) | |
3754 | +#define qemu_mutex_unlock_iothread() do { } while (0) | |
3755 | + | |
3753 | 3756 | #ifdef _WIN32 |
3754 | 3757 | static void host_main_loop_wait(int *timeout) |
3755 | 3758 | { |
... | ... | @@ -3842,7 +3845,9 @@ void main_loop_wait(int timeout) |
3842 | 3845 | slirp_select_fill(&nfds, &rfds, &wfds, &xfds); |
3843 | 3846 | } |
3844 | 3847 | #endif |
3848 | + qemu_mutex_unlock_iothread(); | |
3845 | 3849 | ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv); |
3850 | + qemu_mutex_lock_iothread(); | |
3846 | 3851 | if (ret > 0) { |
3847 | 3852 | IOHandlerRecord **pioh; |
3848 | 3853 | ... | ... |