summaryrefslogtreecommitdiff
path: root/share
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 /share
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 'share')
-rw-r--r--share/man/man9/Makefile6
-rw-r--r--share/man/man9/ml_init.916
-rw-r--r--share/man/man9/mq_init.920
3 files changed, 6 insertions, 36 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index d3039569269..555674da882 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.258 2015/11/21 00:32:46 dlg Exp $
+# $OpenBSD: Makefile,v 1.259 2015/11/21 11:46:24 mpi Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -269,7 +269,7 @@ MLINKS+=microtime.9 getmicrotime.9 microtime.9 microuptime.9 \
microtime.9 getnanotime.9 microtime.9 nanouptime.9 \
microtime.9 getnanouptime.9 microtime.9 bintime.9 \
microtime.9 binuptime.9
-MLINKS+=ml_init.9 ml_enqueue.9 ml_init.9 ml_dequeue.9 ml_init.9 ml_requeue.9 \
+MLINKS+=ml_init.9 ml_enqueue.9 ml_init.9 ml_dequeue.9 \
ml_init.9 ml_enlist.9 ml_init.9 ml_dechain.9 \
ml_init.9 ml_filter.9 ml_init.9 ml_len.9 ml_init.9 ml_empty.9 \
ml_init.9 ml_purge.9 \
@@ -280,7 +280,7 @@ MLINKS+=mutex.9 mtx_init.9 mutex.9 mtx_enter.9 mutex.9 mtx_leave.9 \
mutex.9 MUTEX_ASSERT_LOCKED.9 mutex.9 MUTEX_ASSERT_UNLOCKED.9 \
mutex.9 MUTEX_INITIALIZER.9
MLINKS+=mutex.9 mtx_enter_try.9
-MLINKS+=mq_init.9 mq_enqueue.9 mq_init.9 mq_dequeue.9 mq_init.9 mq_requeue.9 \
+MLINKS+=mq_init.9 mq_enqueue.9 mq_init.9 mq_dequeue.9 \
mq_init.9 mq_enlist.9 mq_init.9 mq_delist.9 \
mq_init.9 mq_dechain.9 mq_init.9 mq_filter.9 mq_init.9 mq_purge.9 \
mq_init.9 mq_len.9 mq_init.9 mq_empty.9 mq_init.9 mq_drops.9 \
diff --git a/share/man/man9/ml_init.9 b/share/man/man9/ml_init.9
index 6f843aeedd9..626da25450e 100644
--- a/share/man/man9/ml_init.9
+++ b/share/man/man9/ml_init.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ml_init.9,v 1.9 2015/11/21 00:32:46 dlg Exp $
+.\" $OpenBSD: ml_init.9,v 1.10 2015/11/21 11:46:24 mpi Exp $
.\"
.\" Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
.\"
@@ -21,7 +21,6 @@
.Nm ml_init ,
.Nm ml_enqueue ,
.Nm ml_dequeue ,
-.Nm ml_requeue ,
.Nm ml_enlist ,
.Nm ml_dechain ,
.Nm ml_len ,
@@ -40,8 +39,6 @@
.Ft struct mbuf *
.Fn ml_dequeue "struct mbuf_list *ml"
.Ft void
-.Fn ml_requeue "struct mbuf_list *ml" "struct mbuf *m"
-.Ft void
.Fn ml_enlist "struct mbuf_list *ml" "struct mbuf_list *src"
.Ft struct mbuf *
.Fn ml_dechain "struct mbuf_list *ml"
@@ -76,10 +73,6 @@ Insertion of a new mbuf at the end of the list.
.It
Removal of an mbuf from the head of the list.
.It
-Reinsertion of an mbuf at the head of the list.
-.It
-Removal of the entire chain of mbufs on the list.
-.El
.Bl -tag -width Ds
.It Fn ml_init "struct mbuf_list *ml"
Initialise the
@@ -97,12 +90,6 @@ mbuf list.
Dequeue an mbuf from the front of the
.Fa ml
mbuf list.
-.It Fn ml_requeue "struct mbuf_list *ml" "struct mbuf *m"
-Enqueue mbuf
-.Fa m
-at the head of the
-.Fa ml
-mbuf list.
.It Fn ml_enlist "struct mbuf_list *ml" "struct mbuf_list *src"
Enqueue all the mbufs on the
.Fa src
@@ -164,7 +151,6 @@ Note that it is unsafe to modify the list while iterating over it.
.Fn ml_init ,
.Fn ml_enqueue ,
.Fn ml_dequeue ,
-.Fn ml_requeue ,
.Fn ml_enlist ,
.Fn ml_dechain ,
.Fn ml_len ,
diff --git a/share/man/man9/mq_init.9 b/share/man/man9/mq_init.9
index ed960f889e6..e9edba9bd13 100644
--- a/share/man/man9/mq_init.9
+++ b/share/man/man9/mq_init.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mq_init.9,v 1.5 2015/11/02 09:21:48 dlg Exp $
+.\" $OpenBSD: mq_init.9,v 1.6 2015/11/21 11:46:24 mpi Exp $
.\"
.\" Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
.\"
@@ -14,14 +14,13 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 2 2015 $
+.Dd $Mdocdate: November 21 2015 $
.Dt MQ_INIT 9
.Os
.Sh NAME
.Nm mq_init ,
.Nm mq_enqueue ,
.Nm mq_dequeue ,
-.Nm mq_requeue ,
.Nm mq_enlist ,
.Nm mq_delist ,
.Nm mq_dechain ,
@@ -41,8 +40,6 @@
.Ft struct mbuf *
.Fn mq_dequeue "struct mbuf_queue *mq"
.Ft int
-.Fn mq_requeue "struct mbuf_queue *mq" "struct mbuf *m"
-.Ft int
.Fn mq_enlist "struct mbuf_queue *mq" "struct mbuf_list *ml"
.Ft void
.Fn mq_delist "struct mbuf_queue *mq" "struct mbuf_list *ml"
@@ -119,14 +116,6 @@ mbuf queue.
Dequeue an mbuf from the front of the
.Fa mq
mbuf queue.
-.It Fn mq_requeue "struct mbuf_queue *mq" "struct mbuf *m"
-Enqueue mbuf
-.Fa m
-at the head of the
-.Fa mq
-mbuf queue.
-Note, this operation will succeed even if it will cause the queue to exceed its
-maximum length.
.It Fn mq_enlist "struct mbuf_queue *mq" "struct mbuf_list *ml"
Enqueue all the mbufs on the
.Fa ml
@@ -194,7 +183,6 @@ already exist on the queue.
.Fn mq_init ,
.Fn mq_enqueue ,
.Fn mq_dequeue ,
-.Fn mq_requeue ,
.Fn mq_enlist ,
.Fn mq_delist ,
.Fn mq_dechain ,
@@ -238,10 +226,6 @@ returns 0 if the mbuf was successfully queued, or non-zero if the
mbuf was freed because it would cause the queue to exceed its maximum
length.
.Pp
-.Fn mq_requeue
-returns non-zero if the mbuf queue is now full, otherwise 0.
-length.
-.Pp
.Fn mq_enlist
returns the number of mbufs that were dropped from the list if the
length of the queue exceeded its maximum length.