Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpnet We have real pollsuck() now, so rem...



details:   https://anonhg.NetBSD.org/src/rev/794eab624f08
branches:  trunk
changeset: 748197:794eab624f08
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Oct 16 00:16:32 2009 +0000

description:
We have real pollsuck() now, so remove this, ahem, less-than-perfect one.
(XXX: only thing in the kernel using pollsuck is netsmb)

diffstat:

 sys/rump/librump/rumpnet/Makefile.rumpnet |   4 +-
 sys/rump/librump/rumpnet/net_emul.c       |  66 -------------------------------
 2 files changed, 2 insertions(+), 68 deletions(-)

diffs (88 lines):

diff -r 7c2d7fcf0923 -r 794eab624f08 sys/rump/librump/rumpnet/Makefile.rumpnet
--- a/sys/rump/librump/rumpnet/Makefile.rumpnet Fri Oct 16 00:14:53 2009 +0000
+++ b/sys/rump/librump/rumpnet/Makefile.rumpnet Fri Oct 16 00:16:32 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.rumpnet,v 1.8 2009/10/14 17:29:20 pooka Exp $
+#      $NetBSD: Makefile.rumpnet,v 1.9 2009/10/16 00:16:32 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -10,7 +10,7 @@
        ${RUMPTOP}/../net                                       \
        ${RUMPTOP}/../compat/common
 
-SRCS=  net_stub.c netisr.c rump_net.c net_emul.c
+SRCS=  net_stub.c netisr.c rump_net.c
 
 SRCS+= rumpnet_if_wrappers.c
 
diff -r 7c2d7fcf0923 -r 794eab624f08 sys/rump/librump/rumpnet/net_emul.c
--- a/sys/rump/librump/rumpnet/net_emul.c       Fri Oct 16 00:14:53 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*     $NetBSD: net_emul.c,v 1.1 2009/09/06 20:02:49 pooka Exp $       */
-
-/*
- * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_emul.c,v 1.1 2009/09/06 20:02:49 pooka Exp $");
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/time.h>
-
-/*
- * A very simplistic (and polling ;) implementation of pollsock().
- * Hopefully I'll soon be able to run sys_select.c
- */
-
-int
-pollsock(struct socket *so, const struct timespec *tsp, int events)
-{
-       struct timespec ts, sts;
-
-       if (tsp) {
-               ts = *tsp;
-               if (inittimeleft(&ts, &sts) == -1)
-                       return EINVAL;
-       }
-
-       for (;;) {
-               if (tsp) {
-                       if (gettimeleft(&ts, &sts) < 0) {
-                               break;
-                       }
-               }
-               if (sopoll(so, events) != 0)
-                       break;
-               kpause("lol", false, hz/10, 0);
-       }
-
-       return 0;
-}



Home | Main Index | Thread Index | Old Index