summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-21 11:46:26 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-21 11:46:26 +0000
commitb65ab644cb4fe65ad9eceec9f677a2e80f80c464 (patch)
treeb5dcc67bb2949ee5d10e07719b39a309b797a7a8 /sys/kern/uipc_mbuf.c
parentf7f8071af854d67c0c70ce319a2af5d283e4164d (diff)
Retire ml_requeue(9) and mq_requeue(9).
As Kenjiro Cho pointed out it is very hard to cancel a dequeue operation for some queueing disciplines when such it keeps some internal states. As you can see, APIs can also Live Fast & Die Young. ok dlg@
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 303943cfc0e..dbf61b6ed8e 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.213 2015/11/13 10:12:39 mpi Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.214 2015/11/21 11:46:24 mpi Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -1315,19 +1315,6 @@ ml_dequeue(struct mbuf_list *ml)
return (m);
}
-void
-ml_requeue(struct mbuf_list *ml, struct mbuf *m)
-{
- if (ml->ml_tail == NULL)
- ml->ml_head = ml->ml_tail = m;
- else {
- m->m_nextpkt = ml->ml_head;
- ml->ml_head = m;
- }
-
- ml->ml_len++;
-}
-
struct mbuf *
ml_dechain(struct mbuf_list *ml)
{
@@ -1431,19 +1418,6 @@ mq_dequeue(struct mbuf_queue *mq)
}
int
-mq_requeue(struct mbuf_queue *mq, struct mbuf *m)
-{
- int full;
-
- mtx_enter(&mq->mq_mtx);
- ml_requeue(&mq->mq_list, m);
- full = mq_len(mq) > mq->mq_maxlen;
- mtx_leave(&mq->mq_mtx);
-
- return (full);
-}
-
-int
mq_enlist(struct mbuf_queue *mq, struct mbuf_list *ml)
{
struct mbuf *m;