.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
+.\" %%%LICENSE_END
.\"
.\" @(#)queue.3 8.2 (Berkeley) 1/24/94
.\"
removes the element
.I elm
from the list.
-.SS List Example
+.SS List example
.nf
LIST_HEAD(listhead, entry) head;
struct listhead *headp; /* List head. */
for (np = head.lh_first; np != NULL; np = np\->entries.le_next)
np\-> ...
-.\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=1506
+.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=1506
while (head.lh_first != NULL) /* Delete. */
LIST_REMOVE(head.lh_first, entries);
.fi
-.SS Tail Queues
+.SS Tail queues
A tail queue is headed by a structure defined by the
.B TAILQ_HEAD
macro.
removes the element
.I elm
from the tail queue.
-.SS Tail Queue Example
+.SS Tail queue example
.nf
TAILQ_HEAD(tailhead, entry) head;
struct tailhead *headp; /* Tail queue head. */
while (head.tqh_first != NULL)
TAILQ_REMOVE(&head, head.tqh_first, entries);
.fi
-.SS Circular Queues
+.SS Circular queues
A circular queue is headed by a structure defined by the
.B CIRCLEQ_HEAD
macro.
removes the element
.I elm
from the circular queue.
-.SS Circular Queue Example
+.SS Circular queue example
.nf
CIRCLEQ_HEAD(circleq, entry) head;
struct circleq *headp; /* Circular queue head. */
while (head.cqh_first != (void *)&head)
CIRCLEQ_REMOVE(&head, head.cqh_first, entries);
.fi
-.SH "CONFORMING TO"
+.SH CONFORMING TO
Not in POSIX.1-2001.
Present on the BSDs.
The
queue functions first appeared in
4.4BSD.
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.