Source-Changes-HG archive

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

[src/trunk]: src/lib/librumphijack pollts:



details:   https://anonhg.NetBSD.org/src/rev/c52587166eea
branches:  trunk
changeset: 761001:c52587166eea
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Jan 18 16:00:04 2011 +0000

description:
pollts:
Since fds[] does not go to both kernels, set revents to 0 when
splitting the vector.  Now any stale revents passed by the caller
do not get counted as results for the kernel which did not "win"
the poll.

This fixes a situation where a firefox transfer would occasionally
stall.  Now firefox works full speed with a rump networking stack.

diffstat:

 lib/librumphijack/hijack.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ff1df8083986 -r c52587166eea lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Tue Jan 18 15:05:03 2011 +0000
+++ b/lib/librumphijack/hijack.c        Tue Jan 18 16:00:04 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.12 2011/01/18 14:51:14 pooka Exp $       */
+/*      $NetBSD: hijack.c,v 1.13 2011/01/18 16:00:04 pooka Exp $       */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.12 2011/01/18 14:51:14 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.13 2011/01/18 16:00:04 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -873,6 +873,7 @@
                                pfd_host[i].fd = fds[i].fd;
                                pfd_host[i].events = fds[i].events;
                        }
+                       fds[i].revents = 0;
                }
 
                /*



Home | Main Index | Thread Index | Old Index