summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2020-04-26 16:36:14 +0000
committerschwarze <>2020-04-26 16:36:14 +0000
commit241295e8155a67d455196dd25c2c9728ad04ca61 (patch)
treec2ce3a3b5ebd0107e0921f59e538d1deca8a9644
parent1601e8a80df65edf9caa16ee5850b4bd14cf4295 (diff)
downloadopenbsd-241295e8155a67d455196dd25c2c9728ad04ca61.tar.gz
openbsd-241295e8155a67d455196dd25c2c9728ad04ca61.tar.bz2
openbsd-241295e8155a67d455196dd25c2c9728ad04ca61.zip
Minimal maintenance to make this mess slightly less confusing:
queue -> list; mention "intrusive"; element -> member at one place; delete a bogus remark that maybe referred to a long-gone implementation in VAX assembly code. Much more could be improved, but i don't want to waste too much time here.
-rw-r--r--src/lib/libc/stdlib/insque.320
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libc/stdlib/insque.3 b/src/lib/libc/stdlib/insque.3
index 16b679b67b..136c08bad8 100644
--- a/src/lib/libc/stdlib/insque.3
+++ b/src/lib/libc/stdlib/insque.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: insque.3,v 1.11 2020/04/26 13:59:56 jmc Exp $ 1.\" $OpenBSD: insque.3,v 1.12 2020/04/26 16:36:14 schwarze Exp $
2.\" Copyright (c) 1993 John Brezak 2.\" Copyright (c) 1993 John Brezak
3.\" All rights reserved. 3.\" All rights reserved.
4.\" 4.\"
@@ -32,7 +32,7 @@
32.Sh NAME 32.Sh NAME
33.Nm insque , 33.Nm insque ,
34.Nm remque 34.Nm remque
35.Nd insert/remove element from a queue 35.Nd legacy doubly linked lists
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.In search.h 37.In search.h
38.Ft void 38.Ft void
@@ -49,9 +49,9 @@ macros and are provided for compatibility with legacy code.
49.Fn insque 49.Fn insque
50and 50and
51.Fn remque 51.Fn remque
52manipulate queues built from doubly linked lists. 52manipulate a legacy variety of intrusive doubly linked lists.
53The queue can be either circular or linear. 53A list can be either circular or linear.
54Each element in the queue must be of the following form: 54Each element in the list must be of the following form:
55.Bd -literal -offset indent 55.Bd -literal -offset indent
56struct qelem { 56struct qelem {
57 struct qelem *q_forw; 57 struct qelem *q_forw;
@@ -60,25 +60,25 @@ struct qelem {
60}; 60};
61.Ed 61.Ed
62.Pp 62.Pp
63The first two elements in the struct must be pointers of the 63The first two members of the struct must be pointers of the
64same type that point to the next and previous elements in 64same type that point to the next and previous elements in
65the queue respectively. 65the list, respectively.
66Any subsequent data in the struct is application-dependent. 66Any subsequent data in the struct is application-dependent.
67.Pp 67.Pp
68The 68The
69.Fn insque 69.Fn insque
70function inserts 70function inserts
71.Fa elem 71.Fa elem
72into a queue immediately after 72into a list immediately after
73.Fa pred . 73.Fa pred .
74.Pp 74.Pp
75The 75The
76.Fn remque 76.Fn remque
77function removes 77function removes
78.Fa elem 78.Fa elem
79from the queue. 79from the list.
80.Pp 80.Pp
81These functions are not atomic unless that machine architecture allows it. 81These functions are not atomic.
82.Sh SEE ALSO 82.Sh SEE ALSO
83.Xr queue 3 83.Xr queue 3
84.Sh STANDARDS 84.Sh STANDARDS