summaryrefslogtreecommitdiffstats
path: root/man3/stailq.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/stailq.364
1 files changed, 32 insertions, 32 deletions
diff --git a/man3/stailq.3 b/man3/stailq.3
index 2fca240..367b2bf 100644
--- a/man3/stailq.3
+++ b/man3/stailq.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH STAILQ 3 2023-05-03 "Linux man-pages 6.05.01"
+.TH STAILQ 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
.\"SIMPLEQ_CONCAT,
SIMPLEQ_EMPTY,
@@ -54,43 +54,43 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sys/queue.h>
-.PP
+.P
.B STAILQ_ENTRY(TYPE);
-.PP
+.P
.B STAILQ_HEAD(HEADNAME, TYPE);
.BI "STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD " head );
.BI "void STAILQ_INIT(STAILQ_HEAD *" head );
-.PP
+.P
.BI "int STAILQ_EMPTY(STAILQ_HEAD *" head );
-.PP
+.P
.BI "void STAILQ_INSERT_HEAD(STAILQ_HEAD *" head ,
.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME );
.BI "void STAILQ_INSERT_TAIL(STAILQ_HEAD *" head ,
.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME );
.BI "void STAILQ_INSERT_AFTER(STAILQ_HEAD *" head ", struct TYPE *" listelm ,
.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME );
-.PP
+.P
.BI "struct TYPE *STAILQ_FIRST(STAILQ_HEAD *" head );
.\" .BI "struct TYPE *STAILQ_LAST(STAILQ_HEAD *" head ", struct TYPE *" elm ,
.\" .BI " STAILQ_ENTRY " NAME );
.BI "struct TYPE *STAILQ_NEXT(struct TYPE *" elm ", STAILQ_ENTRY " NAME );
-.PP
+.P
.BI "STAILQ_FOREACH(struct TYPE *" var ", STAILQ_HEAD *" head ", STAILQ_ENTRY " NAME );
.\" .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head ,
.\" .BI " STAILQ_ENTRY " NAME );
-.\" .PP
+.\" .P
.\" .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head ,
.\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var );
.\" .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head ,
.\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var );
-.PP
+.P
.BI "void STAILQ_REMOVE(STAILQ_HEAD *" head ", struct TYPE *" elm ", TYPE,"
.BI " STAILQ_ENTRY " NAME );
.BI "void STAILQ_REMOVE_HEAD(STAILQ_HEAD *" head ,
.BI " STAILQ_ENTRY " NAME );
.\" .BI "void STAILQ_REMOVE_AFTER(STAILQ_HEAD *" head ", struct TYPE *" elm ,
.\" .BI " STAILQ_ENTRY " NAME );
-.PP
+.P
.BI "void STAILQ_CONCAT(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 );
.\" .BI "void STAILQ_SWAP(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 ,
.\" .BI " STAILQ_ENTRY " NAME );
@@ -99,7 +99,7 @@ Standard C library
Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.
.SH DESCRIPTION
These macros define and operate on singly linked tail queues.
-.PP
+.P
In the macro definitions,
.I TYPE
is the name of a user-defined structure,
@@ -126,43 +126,43 @@ at the head of the tail queue, or at the end of the tail queue.
A
.I STAILQ_HEAD
structure is declared as follows:
-.PP
+.P
.in +4
.EX
STAILQ_HEAD(HEADNAME, TYPE) head;
.EE
.in
-.PP
+.P
where
.I struct HEADNAME
is the structure to be defined, and
.I struct TYPE
is the type of the elements to be linked into the tail queue.
A pointer to the head of the tail queue can later be declared as:
-.PP
+.P
.in +4
.EX
struct HEADNAME *headp;
.EE
.in
-.PP
+.P
(The names
.I head
and
.I headp
are user selectable.)
-.PP
+.P
.BR STAILQ_ENTRY ()
declares a structure that connects the elements in the tail queue.
-.PP
+.P
.BR STAILQ_HEAD_INITIALIZER ()
evaluates to an initializer for the tail queue
.IR head .
-.PP
+.P
.BR STAILQ_INIT ()
initializes the tail queue referenced by
.IR head .
-.PP
+.P
.BR STAILQ_EMPTY ()
evaluates to true if there are no items on the tail queue.
.SS Insertion
@@ -170,12 +170,12 @@ evaluates to true if there are no items on the tail queue.
inserts the new element
.I elm
at the head of the tail queue.
-.PP
+.P
.BR STAILQ_INSERT_TAIL ()
inserts the new element
.I elm
at the end of the tail queue.
-.PP
+.P
.BR STAILQ_INSERT_AFTER ()
inserts the new element
.I elm
@@ -184,21 +184,21 @@ after the element
.SS Traversal
.BR STAILQ_FIRST ()
returns the first item on the tail queue or NULL if the tail queue is empty.
-.\" .PP
+.\" .P
.\" .BR STAILQ_LAST ()
.\" returns the last item on the tail queue.
.\" If the tail queue is empty the return value is NULL .
-.PP
+.P
.BR STAILQ_NEXT ()
returns the next item on the tail queue, or NULL this item is the last.
-.PP
+.P
.BR STAILQ_FOREACH ()
traverses the tail queue referenced by
.I head
in the forward direction,
assigning each element in turn to
.IR var .
-.\" .PP
+.\" .P
.\" .BR STAILQ_FOREACH_FROM ()
.\" behaves identically to
.\" .BR STAILQ_FOREACH ()
@@ -210,7 +210,7 @@ assigning each element in turn to
.\" .I var
.\" instead of the first element in the STAILQ referenced by
.\" .IR head .
-.\" .PP
+.\" .P
.\" .BR STAILQ_FOREACH_SAFE ()
.\" traverses the tail queue referenced by
.\" .I head
@@ -223,7 +223,7 @@ assigning each element in turn to
.\" .I var
.\" as well as free it from within the loop safely without interfering with the
.\" traversal.
-.\" .PP
+.\" .P
.\" .BR STAILQ_FOREACH_FROM_SAFE ()
.\" behaves identically to
.\" .BR STAILQ_FOREACH_SAFE ()
@@ -240,7 +240,7 @@ assigning each element in turn to
removes the element
.I elm
from the tail queue.
-.PP
+.P
.BR STAILQ_REMOVE_HEAD ()
removes the element at the head of the tail queue.
For optimum efficiency,
@@ -248,7 +248,7 @@ elements being removed from the head of the tail queue should
use this macro explicitly rather than the generic
.BR STAILQ_REMOVE ()
macro.
-.\" .PP
+.\" .P
.\" .BR STAILQ_REMOVE_AFTER ()
.\" removes the element after
.\" .I elm
@@ -263,7 +263,7 @@ concatenates the tail queue headed by
onto the end of the one headed by
.I head1
removing all entries from the former.
-.\" .PP
+.\" .P
.\" .BR STAILQ_SWAP ()
.\" swaps the contents of
.\" .I head1
@@ -273,14 +273,14 @@ removing all entries from the former.
.BR STAILQ_EMPTY ()
returns nonzero if the queue is empty,
and zero if the queue contains at least one entry.
-.PP
+.P
.BR STAILQ_FIRST (),
and
.BR STAILQ_NEXT ()
return a pointer to the first or next
.I TYPE
structure, respectively.
-.PP
+.P
.BR STAILQ_HEAD_INITIALIZER ()
returns an initializer that can be assigned to the queue
.IR head .