summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-04-24 04:11:08 +0000
committersilby <silby@FreeBSD.org>2002-04-24 04:11:08 +0000
commitb4055530fc4c41c58a6ac51b6b5dece2bbe25f1b (patch)
treeaca9c37106d1ce217167006c407ac4fd75a25356 /sys/kern/uipc_sockbuf.c
parent40d13085f4ad7785dfe13370ebbd77152628fef9 (diff)
downloadFreeBSD-src-b4055530fc4c41c58a6ac51b6b5dece2bbe25f1b.zip
FreeBSD-src-b4055530fc4c41c58a6ac51b6b5dece2bbe25f1b.tar.gz
Remove sodropablereq - this function hasn't been used since the
syncache went in. MFC after: 3 days
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 40907f9..47bf7bb 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -162,50 +162,6 @@ soisdisconnected(so)
}
/*
- * Return a random connection that hasn't been serviced yet and
- * is eligible for discard. There is a one in qlen chance that
- * we will return a null, saying that there are no dropable
- * requests. In this case, the protocol specific code should drop
- * the new request. This insures fairness.
- *
- * This may be used in conjunction with protocol specific queue
- * congestion routines.
- */
-struct socket *
-sodropablereq(head)
- register struct socket *head;
-{
- register struct socket *so;
- unsigned int i, j, qlen;
- static int rnd;
- static struct timeval old_runtime;
- static unsigned int cur_cnt, old_cnt;
- struct timeval tv;
-
- getmicrouptime(&tv);
- if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
- old_runtime = tv;
- old_cnt = cur_cnt / i;
- cur_cnt = 0;
- }
-
- so = TAILQ_FIRST(&head->so_incomp);
- if (!so)
- return (so);
-
- qlen = head->so_incqlen;
- if (++cur_cnt > qlen || old_cnt > qlen) {
- rnd = (314159 * rnd + 66329) & 0xffff;
- j = ((qlen + 1) * rnd) >> 16;
-
- while (j-- && so)
- so = TAILQ_NEXT(so, so_list);
- }
-
- return (so);
-}
-
-/*
* When an attempt at a new connection is noted on a socket
* which accepts connections, sonewconn is called. If the
* connection is possible (subject to space constraints, etc.)
OpenPOWER on IntegriCloud