mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
slirp: set mainloop timeout with more precise value
If slirp needs to emulate tcp timeout, then the timeout value for mainloop should be more precise, which is determined by slirp's fasttimo or slowtimo. Achieve this by swap the logic sequence of slirp_pollfds_fill and slirp_update_timeout. Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
9b0ca6cc64
commit
a42e9c4188
4 changed files with 27 additions and 13 deletions
|
@ -466,8 +466,7 @@ int main_loop_wait(int nonblocking)
|
|||
g_array_set_size(gpollfds, 0); /* reset for new iteration */
|
||||
/* XXX: separate device handlers from system ones */
|
||||
#ifdef CONFIG_SLIRP
|
||||
slirp_update_timeout(&timeout);
|
||||
slirp_pollfds_fill(gpollfds);
|
||||
slirp_pollfds_fill(gpollfds, &timeout);
|
||||
#endif
|
||||
qemu_iohandler_fill(gpollfds);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue