qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more pr


From: Alex Bligh
Subject: Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value
Date: Wed, 21 Aug 2013 08:36:36 +0100



--On 21 August 2013 10:15:52 +0800 Liu Ping Fan <address@hidden> wrote:

-void slirp_update_timeout(uint32_t *timeout)
+static void slirp_update_timeout(uint32_t *timeout)
 {
-    if (!QTAILQ_EMPTY(&slirp_instances)) {
-        *timeout = MIN(1000, *timeout);

If you are putting things in macros, you might as well change that
1000 as well, and hopefully comment why that particular magic value
is there.

+    Slirp *slirp;
+    uint32_t t;
+
+    *timeout = MIN(1000, *timeout);
+    if (*timeout <= TIMEOUT_FAST) {
+        return;
+    }
+    t = *timeout;



--
Alex Bligh



reply via email to

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