\section{aversive\_\-10-03-12/include/aversive/queue.h File Reference}
\label{queue_8h}\index{aversive\_\-10-03-12/include/aversive/queue.h@{aversive\_\-10-03-12/include/aversive/queue.h}}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf \_\-\_\-offsetof}(type, field)~((size\_\-t)(\&(type $\ast$)0) $\rightarrow$ field))
\item 
\#define {\bf SLIST\_\-HEAD}(name, type)
\item 
\#define {\bf SLIST\_\-HEAD\_\-INITIALIZER}(head)~\{ NULL \}
\item 
\#define {\bf SLIST\_\-ENTRY}(type)
\item 
\#define {\bf SLIST\_\-EMPTY}(head)~((head) $\rightarrow$ slh\_\-first == NULL)
\item 
\#define {\bf SLIST\_\-FIRST}(head)~((head) $\rightarrow$ slh\_\-first)
\item 
\#define {\bf SLIST\_\-FOREACH}(var, head, field)
\item 
\#define {\bf SLIST\_\-INIT}(head)
\item 
\#define {\bf SLIST\_\-INSERT\_\-AFTER}(slistelm, elm, field)
\item 
\#define {\bf SLIST\_\-INSERT\_\-HEAD}(head, elm, field)
\item 
\#define {\bf SLIST\_\-NEXT}(elm, field)~((elm) $\rightarrow$ field.sle\_\-next)
\item 
\#define {\bf SLIST\_\-REMOVE}(head, elm, type, field)
\item 
\#define {\bf SLIST\_\-REMOVE\_\-HEAD}(head, field)
\item 
\#define {\bf STAILQ\_\-HEAD}(name, type)
\item 
\#define {\bf STAILQ\_\-HEAD\_\-INITIALIZER}(head)~\{ NULL, \&(head).stqh\_\-first \}
\item 
\#define {\bf STAILQ\_\-ENTRY}(type)
\item 
\#define {\bf STAILQ\_\-EMPTY}(head)~((head) $\rightarrow$ stqh\_\-first == NULL)
\item 
\#define {\bf STAILQ\_\-FIRST}(head)~((head) $\rightarrow$ stqh\_\-first)
\item 
\#define {\bf STAILQ\_\-FOREACH}(var, head, field)
\item 
\#define {\bf STAILQ\_\-INIT}(head)
\item 
\#define {\bf STAILQ\_\-INSERT\_\-AFTER}(head, tqelm, elm, field)
\item 
\#define {\bf STAILQ\_\-INSERT\_\-HEAD}(head, elm, field)
\item 
\#define {\bf STAILQ\_\-INSERT\_\-TAIL}(head, elm, field)
\item 
\#define {\bf STAILQ\_\-LAST}(head, type, field)
\item 
\#define {\bf STAILQ\_\-NEXT}(elm, field)~((elm) $\rightarrow$ field.stqe\_\-next)
\item 
\#define {\bf STAILQ\_\-REMOVE}(head, elm, type, field)
\item 
\#define {\bf STAILQ\_\-REMOVE\_\-HEAD}(head, field)
\item 
\#define {\bf STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL}(head, elm, field)
\item 
\#define {\bf LIST\_\-HEAD}(name, type)
\item 
\#define {\bf LIST\_\-HEAD\_\-INITIALIZER}(head)~\{ NULL \}
\item 
\#define {\bf LIST\_\-ENTRY}(type)
\item 
\#define {\bf LIST\_\-EMPTY}(head)~((head) $\rightarrow$ lh\_\-first == NULL)
\item 
\#define {\bf LIST\_\-FIRST}(head)~((head) $\rightarrow$ lh\_\-first)
\item 
\#define {\bf LIST\_\-FOREACH}(var, head, field)
\item 
\#define {\bf LIST\_\-INIT}(head)
\item 
\#define {\bf LIST\_\-INSERT\_\-AFTER}(listelm, elm, field)
\item 
\#define {\bf LIST\_\-INSERT\_\-BEFORE}(listelm, elm, field)
\item 
\#define {\bf LIST\_\-INSERT\_\-HEAD}(head, elm, field)
\item 
\#define {\bf LIST\_\-NEXT}(elm, field)~((elm) $\rightarrow$ field.le\_\-next)
\item 
\#define {\bf LIST\_\-REMOVE}(elm, field)
\item 
\#define {\bf TAILQ\_\-HEAD}(name, type)
\item 
\#define {\bf TAILQ\_\-HEAD\_\-INITIALIZER}(head)~\{ NULL, \&(head).tqh\_\-first \}
\item 
\#define {\bf TAILQ\_\-ENTRY}(type)
\item 
\#define {\bf TAILQ\_\-EMPTY}(head)~((head) $\rightarrow$ tqh\_\-first == NULL)
\item 
\#define {\bf TAILQ\_\-FIRST}(head)~((head) $\rightarrow$ tqh\_\-first)
\item 
\#define {\bf TAILQ\_\-FOREACH}(var, head, field)
\item 
\#define {\bf TAILQ\_\-FOREACH\_\-REVERSE}(var, head, headname, field)
\item 
\#define {\bf TAILQ\_\-INIT}(head)
\item 
\#define {\bf TAILQ\_\-INSERT\_\-AFTER}(head, listelm, elm, field)
\item 
\#define {\bf TAILQ\_\-INSERT\_\-BEFORE}(listelm, elm, field)
\item 
\#define {\bf TAILQ\_\-INSERT\_\-HEAD}(head, elm, field)
\item 
\#define {\bf TAILQ\_\-INSERT\_\-TAIL}(head, elm, field)
\item 
\#define {\bf TAILQ\_\-LAST}(head, headname)~($\ast$(((struct headname $\ast$)((head) $\rightarrow$ tqh\_\-last)) $\rightarrow$ tqh\_\-last))
\item 
\#define {\bf TAILQ\_\-NEXT}(elm, field)~((elm) $\rightarrow$ field.tqe\_\-next)
\item 
\#define {\bf TAILQ\_\-PREV}(elm, headname, field)~($\ast$(((struct headname $\ast$)((elm) $\rightarrow$ field.tqe\_\-prev)) $\rightarrow$ tqh\_\-last))
\item 
\#define {\bf TAILQ\_\-REMOVE}(head, elm, field)
\item 
\#define {\bf CIRCLEQ\_\-HEAD}(name, type)
\item 
\#define {\bf CIRCLEQ\_\-HEAD\_\-INITIALIZER}(head)~\{ (void $\ast$)\&(head), (void $\ast$)\&(head) \}
\item 
\#define {\bf CIRCLEQ\_\-ENTRY}(type)
\item 
\#define {\bf CIRCLEQ\_\-EMPTY}(head)~((head) $\rightarrow$ cqh\_\-first == (void $\ast$)(head))
\item 
\#define {\bf CIRCLEQ\_\-FIRST}(head)~((head) $\rightarrow$ cqh\_\-first)
\item 
\#define {\bf CIRCLEQ\_\-FOREACH}(var, head, field)
\item 
\#define {\bf CIRCLEQ\_\-FOREACH\_\-REVERSE}(var, head, field)
\item 
\#define {\bf CIRCLEQ\_\-INIT}(head)
\item 
\#define {\bf CIRCLEQ\_\-INSERT\_\-AFTER}(head, listelm, elm, field)
\item 
\#define {\bf CIRCLEQ\_\-INSERT\_\-BEFORE}(head, listelm, elm, field)
\item 
\#define {\bf CIRCLEQ\_\-INSERT\_\-HEAD}(head, elm, field)
\item 
\#define {\bf CIRCLEQ\_\-INSERT\_\-TAIL}(head, elm, field)
\item 
\#define {\bf CIRCLEQ\_\-LAST}(head)~((head) $\rightarrow$ cqh\_\-last)
\item 
\#define {\bf CIRCLEQ\_\-NEXT}(elm, field)~((elm) $\rightarrow$ field.cqe\_\-next)
\item 
\#define {\bf CIRCLEQ\_\-PREV}(elm, field)~((elm) $\rightarrow$ field.cqe\_\-prev)
\item 
\#define {\bf CIRCLEQ\_\-REMOVE}(head, elm, field)
\end{CompactItemize}


\subsection{Define Documentation}
\index{queue.h@{queue.h}!\_\-\_\-offsetof@{\_\-\_\-offsetof}}
\index{\_\-\_\-offsetof@{\_\-\_\-offsetof}!queue.h@{queue.h}}
\subsubsection[\_\-\_\-offsetof]{\setlength{\rightskip}{0pt plus 5cm}\#define \_\-\_\-offsetof(type, \/  field)~((size\_\-t)(\&(type $\ast$)0) $\rightarrow$ field))}\label{queue_8h_1eb5255e1d14c0f5b812d26c0c38ef81}




Definition at line 41 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-EMPTY@{CIRCLEQ\_\-EMPTY}}
\index{CIRCLEQ\_\-EMPTY@{CIRCLEQ\_\-EMPTY}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-EMPTY]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-EMPTY(head)~((head) $\rightarrow$ cqh\_\-first == (void $\ast$)(head))}\label{queue_8h_5612649227a37a22f0b8b6420d5f2c92}




Definition at line 438 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-ENTRY@{CIRCLEQ\_\-ENTRY}}
\index{CIRCLEQ\_\-ENTRY@{CIRCLEQ\_\-ENTRY}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-ENTRY]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-ENTRY(type)}\label{queue_8h_bc5774651e7db6bcecf18d2b92259707}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct {                                                                \
        struct type *cqe_next;          /* next element */              \
        struct type *cqe_prev;          /* previous element */          \
}
\end{verbatim}
\end{Code}


Definition at line 429 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-FIRST@{CIRCLEQ\_\-FIRST}}
\index{CIRCLEQ\_\-FIRST@{CIRCLEQ\_\-FIRST}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-FIRST]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-FIRST(head)~((head) $\rightarrow$ cqh\_\-first)}\label{queue_8h_b6bde704fab7206d75cf540048cea723}




Definition at line 440 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-FOREACH@{CIRCLEQ\_\-FOREACH}}
\index{CIRCLEQ\_\-FOREACH@{CIRCLEQ\_\-FOREACH}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-FOREACH]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-FOREACH(var, \/  head, \/  field)}\label{queue_8h_e97f4eb5724477c63699fafea4614b46}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = CIRCLEQ_FIRST((head));                             \
            (var) != (void *)(head) || ((var) = NULL);                  \
            (var) = CIRCLEQ_NEXT((var), field))
\end{verbatim}
\end{Code}


Definition at line 442 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-FOREACH\_\-REVERSE@{CIRCLEQ\_\-FOREACH\_\-REVERSE}}
\index{CIRCLEQ\_\-FOREACH\_\-REVERSE@{CIRCLEQ\_\-FOREACH\_\-REVERSE}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-FOREACH\_\-REVERSE]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-FOREACH\_\-REVERSE(var, \/  head, \/  field)}\label{queue_8h_212ecf8e0e17e1c74603b719cab4a9bc}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = CIRCLEQ_LAST((head));                              \
            (var) != (void *)(head) || ((var) = NULL);                  \
            (var) = CIRCLEQ_PREV((var), field))
\end{verbatim}
\end{Code}


Definition at line 447 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-HEAD@{CIRCLEQ\_\-HEAD}}
\index{CIRCLEQ\_\-HEAD@{CIRCLEQ\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-HEAD(name, \/  type)}\label{queue_8h_c564235b07f0c8c8db2a7957d37300ee}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct name {                                                           \
        struct type *cqh_first;         /* first element */             \
        struct type *cqh_last;          /* last element */              \
}
\end{verbatim}
\end{Code}


Definition at line 420 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-HEAD\_\-INITIALIZER@{CIRCLEQ\_\-HEAD\_\-INITIALIZER}}
\index{CIRCLEQ\_\-HEAD\_\-INITIALIZER@{CIRCLEQ\_\-HEAD\_\-INITIALIZER}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-HEAD\_\-INITIALIZER]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-HEAD\_\-INITIALIZER(head)~\{ (void $\ast$)\&(head), (void $\ast$)\&(head) \}}\label{queue_8h_66bcae453448e43a4233428494aca741}




Definition at line 426 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-INIT@{CIRCLEQ\_\-INIT}}
\index{CIRCLEQ\_\-INIT@{CIRCLEQ\_\-INIT}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-INIT]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-INIT(head)}\label{queue_8h_2c12c697981b6dbe21822ccdfd8decfd}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                            \
        CIRCLEQ_FIRST((head)) = (void *)(head);                         \
        CIRCLEQ_LAST((head)) = (void *)(head);                          \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 452 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-INSERT\_\-AFTER@{CIRCLEQ\_\-INSERT\_\-AFTER}}
\index{CIRCLEQ\_\-INSERT\_\-AFTER@{CIRCLEQ\_\-INSERT\_\-AFTER}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-INSERT\_\-AFTER]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-INSERT\_\-AFTER(head, \/  listelm, \/  elm, \/  field)}\label{queue_8h_108b36ff00cbf59efbbf185baac770b4}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {            \
        CIRCLEQ_NEXT((elm), field) = CIRCLEQ_NEXT((listelm), field);    \
        CIRCLEQ_PREV((elm), field) = (listelm);                         \
        if (CIRCLEQ_NEXT((listelm), field) == (void *)(head))           \
                CIRCLEQ_LAST((head)) = (elm);                           \
        else                                                            \
                CIRCLEQ_PREV(CIRCLEQ_NEXT((listelm), field), field) = (elm);\
        CIRCLEQ_NEXT((listelm), field) = (elm);                         \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 457 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-INSERT\_\-BEFORE@{CIRCLEQ\_\-INSERT\_\-BEFORE}}
\index{CIRCLEQ\_\-INSERT\_\-BEFORE@{CIRCLEQ\_\-INSERT\_\-BEFORE}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-INSERT\_\-BEFORE]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-INSERT\_\-BEFORE(head, \/  listelm, \/  elm, \/  field)}\label{queue_8h_f5cda165eacfbfe150e86c12baa96089}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {            \
        CIRCLEQ_NEXT((elm), field) = (listelm);                         \
        CIRCLEQ_PREV((elm), field) = CIRCLEQ_PREV((listelm), field);    \
        if (CIRCLEQ_PREV((listelm), field) == (void *)(head))           \
                CIRCLEQ_FIRST((head)) = (elm);                          \
        else                                                            \
                CIRCLEQ_NEXT(CIRCLEQ_PREV((listelm), field), field) = (elm);\
        CIRCLEQ_PREV((listelm), field) = (elm);                         \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 467 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-INSERT\_\-HEAD@{CIRCLEQ\_\-INSERT\_\-HEAD}}
\index{CIRCLEQ\_\-INSERT\_\-HEAD@{CIRCLEQ\_\-INSERT\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-INSERT\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-INSERT\_\-HEAD(head, \/  elm, \/  field)}\label{queue_8h_2826789c50d93610c6c1e2f76651259a}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        CIRCLEQ_NEXT((elm), field) = CIRCLEQ_FIRST((head));             \
        CIRCLEQ_PREV((elm), field) = (void *)(head);                    \
        if (CIRCLEQ_LAST((head)) == (void *)(head))                     \
                CIRCLEQ_LAST((head)) = (elm);                           \
        else                                                            \
                CIRCLEQ_PREV(CIRCLEQ_FIRST((head)), field) = (elm);     \
        CIRCLEQ_FIRST((head)) = (elm);                                  \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 477 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-INSERT\_\-TAIL@{CIRCLEQ\_\-INSERT\_\-TAIL}}
\index{CIRCLEQ\_\-INSERT\_\-TAIL@{CIRCLEQ\_\-INSERT\_\-TAIL}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-INSERT\_\-TAIL]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-INSERT\_\-TAIL(head, \/  elm, \/  field)}\label{queue_8h_a2b767125267fa26ca10e21fa358008c}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        CIRCLEQ_NEXT((elm), field) = (void *)(head);                    \
        CIRCLEQ_PREV((elm), field) = CIRCLEQ_LAST((head));              \
        if (CIRCLEQ_FIRST((head)) == (void *)(head))                    \
                CIRCLEQ_FIRST((head)) = (elm);                          \
        else                                                            \
                CIRCLEQ_NEXT(CIRCLEQ_LAST((head)), field) = (elm);      \
        CIRCLEQ_LAST((head)) = (elm);                                   \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 487 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-LAST@{CIRCLEQ\_\-LAST}}
\index{CIRCLEQ\_\-LAST@{CIRCLEQ\_\-LAST}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-LAST]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-LAST(head)~((head) $\rightarrow$ cqh\_\-last)}\label{queue_8h_5e9a63e6896e72acbf0bdbdf45baeb1a}




Definition at line 497 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-NEXT@{CIRCLEQ\_\-NEXT}}
\index{CIRCLEQ\_\-NEXT@{CIRCLEQ\_\-NEXT}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-NEXT]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-NEXT(elm, \/  field)~((elm) $\rightarrow$ field.cqe\_\-next)}\label{queue_8h_7d1437823e61cb4941eee6a05705f567}




Definition at line 499 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-PREV@{CIRCLEQ\_\-PREV}}
\index{CIRCLEQ\_\-PREV@{CIRCLEQ\_\-PREV}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-PREV]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-PREV(elm, \/  field)~((elm) $\rightarrow$ field.cqe\_\-prev)}\label{queue_8h_e15b6cb06907211e1e5c621fdf0f4030}




Definition at line 501 of file queue.h.\index{queue.h@{queue.h}!CIRCLEQ\_\-REMOVE@{CIRCLEQ\_\-REMOVE}}
\index{CIRCLEQ\_\-REMOVE@{CIRCLEQ\_\-REMOVE}!queue.h@{queue.h}}
\subsubsection[CIRCLEQ\_\-REMOVE]{\setlength{\rightskip}{0pt plus 5cm}\#define CIRCLEQ\_\-REMOVE(head, \/  elm, \/  field)}\label{queue_8h_e1b066e803ee2f2a3ead6e4c632b7e49}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                            \
        if (CIRCLEQ_NEXT((elm), field) == (void *)(head))               \
                CIRCLEQ_LAST((head)) = CIRCLEQ_PREV((elm), field);      \
        else                                                            \
                CIRCLEQ_PREV(CIRCLEQ_NEXT((elm), field), field) =       \
                    CIRCLEQ_PREV((elm), field);                         \
        if (CIRCLEQ_PREV((elm), field) == (void *)(head))               \
                CIRCLEQ_FIRST((head)) = CIRCLEQ_NEXT((elm), field);     \
        else                                                            \
                CIRCLEQ_NEXT(CIRCLEQ_PREV((elm), field), field) =       \
                    CIRCLEQ_NEXT((elm), field);                         \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 503 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-EMPTY@{LIST\_\-EMPTY}}
\index{LIST\_\-EMPTY@{LIST\_\-EMPTY}!queue.h@{queue.h}}
\subsubsection[LIST\_\-EMPTY]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-EMPTY(head)~((head) $\rightarrow$ lh\_\-first == NULL)}\label{queue_8h_f59ab30a8f9a88af86422600c38125cf}




Definition at line 282 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-ENTRY@{LIST\_\-ENTRY}}
\index{LIST\_\-ENTRY@{LIST\_\-ENTRY}!queue.h@{queue.h}}
\subsubsection[LIST\_\-ENTRY]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-ENTRY(type)}\label{queue_8h_ec2ccd0e8c215504508af23f04480be6}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct {                                                                \
        struct type *le_next;   /* next element */                      \
        struct type **le_prev;  /* address of previous next element */  \
}
\end{verbatim}
\end{Code}


Definition at line 272 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-FIRST@{LIST\_\-FIRST}}
\index{LIST\_\-FIRST@{LIST\_\-FIRST}!queue.h@{queue.h}}
\subsubsection[LIST\_\-FIRST]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-FIRST(head)~((head) $\rightarrow$ lh\_\-first)}\label{queue_8h_8f223070a7fe7c5f24033e9d8fbeb610}




Definition at line 284 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-FOREACH@{LIST\_\-FOREACH}}
\index{LIST\_\-FOREACH@{LIST\_\-FOREACH}!queue.h@{queue.h}}
\subsubsection[LIST\_\-FOREACH]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-FOREACH(var, \/  head, \/  field)}\label{queue_8h_c1543beeb6d9224b60feb7a2703b2a87}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = LIST_FIRST((head));                                \
            (var);                                                      \
            (var) = LIST_NEXT((var), field))
\end{verbatim}
\end{Code}


Definition at line 286 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-HEAD@{LIST\_\-HEAD}}
\index{LIST\_\-HEAD@{LIST\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[LIST\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-HEAD(name, \/  type)}\label{queue_8h_e72219f63b2fe9bce774a64e11404179}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct name {                                                           \
        struct type *lh_first;  /* first element */                     \
}
\end{verbatim}
\end{Code}


Definition at line 264 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-HEAD\_\-INITIALIZER@{LIST\_\-HEAD\_\-INITIALIZER}}
\index{LIST\_\-HEAD\_\-INITIALIZER@{LIST\_\-HEAD\_\-INITIALIZER}!queue.h@{queue.h}}
\subsubsection[LIST\_\-HEAD\_\-INITIALIZER]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-HEAD\_\-INITIALIZER(head)~\{ NULL \}}\label{queue_8h_5d7b8e9f9968d3152a8519cd9a45312e}




Definition at line 269 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-INIT@{LIST\_\-INIT}}
\index{LIST\_\-INIT@{LIST\_\-INIT}!queue.h@{queue.h}}
\subsubsection[LIST\_\-INIT]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-INIT(head)}\label{queue_8h_304b5b7f7bdcba2793eaba9c890991c3}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                            \
        LIST_FIRST((head)) = NULL;                                      \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 291 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-INSERT\_\-AFTER@{LIST\_\-INSERT\_\-AFTER}}
\index{LIST\_\-INSERT\_\-AFTER@{LIST\_\-INSERT\_\-AFTER}!queue.h@{queue.h}}
\subsubsection[LIST\_\-INSERT\_\-AFTER]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-INSERT\_\-AFTER(listelm, \/  elm, \/  field)}\label{queue_8h_ab62f53d4c94ab67bf7c4dc5c7670f64}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
                LIST_NEXT((listelm), field)->field.le_prev =            \
                    &LIST_NEXT((elm), field);                           \
        LIST_NEXT((listelm), field) = (elm);                            \
        (elm)->field.le_prev = &LIST_NEXT((listelm), field);            \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 295 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-INSERT\_\-BEFORE@{LIST\_\-INSERT\_\-BEFORE}}
\index{LIST\_\-INSERT\_\-BEFORE@{LIST\_\-INSERT\_\-BEFORE}!queue.h@{queue.h}}
\subsubsection[LIST\_\-INSERT\_\-BEFORE]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-INSERT\_\-BEFORE(listelm, \/  elm, \/  field)}\label{queue_8h_73d12127b84f84215eb03a4fb20feebb}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        (elm)->field.le_prev = (listelm)->field.le_prev;                \
        LIST_NEXT((elm), field) = (listelm);                            \
        *(listelm)->field.le_prev = (elm);                              \
        (listelm)->field.le_prev = &LIST_NEXT((elm), field);            \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 303 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-INSERT\_\-HEAD@{LIST\_\-INSERT\_\-HEAD}}
\index{LIST\_\-INSERT\_\-HEAD@{LIST\_\-INSERT\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[LIST\_\-INSERT\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-INSERT\_\-HEAD(head, \/  elm, \/  field)}\label{queue_8h_d80d8d658fdb46a9f7cc81cb2ae54885}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                            \
        if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL)     \
                LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
        LIST_FIRST((head)) = (elm);                                     \
        (elm)->field.le_prev = &LIST_FIRST((head));                     \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 310 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-NEXT@{LIST\_\-NEXT}}
\index{LIST\_\-NEXT@{LIST\_\-NEXT}!queue.h@{queue.h}}
\subsubsection[LIST\_\-NEXT]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-NEXT(elm, \/  field)~((elm) $\rightarrow$ field.le\_\-next)}\label{queue_8h_d150fcc4dc3e0a56600101f1f1065ed5}




Definition at line 317 of file queue.h.\index{queue.h@{queue.h}!LIST\_\-REMOVE@{LIST\_\-REMOVE}}
\index{LIST\_\-REMOVE@{LIST\_\-REMOVE}!queue.h@{queue.h}}
\subsubsection[LIST\_\-REMOVE]{\setlength{\rightskip}{0pt plus 5cm}\#define LIST\_\-REMOVE(elm, \/  field)}\label{queue_8h_4f60a3fedbebc5ef6edded99062dd98d}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                    \
        if (LIST_NEXT((elm), field) != NULL)                            \
                LIST_NEXT((elm), field)->field.le_prev =                \
                    (elm)->field.le_prev;                               \
        *(elm)->field.le_prev = LIST_NEXT((elm), field);                \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 319 of file queue.h.\index{queue.h@{queue.h}!SLIST\_\-EMPTY@{SLIST\_\-EMPTY}}
\index{SLIST\_\-EMPTY@{SLIST\_\-EMPTY}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-EMPTY]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-EMPTY(head)~((head) $\rightarrow$ slh\_\-first == NULL)}\label{queue_8h_59bcc4e6f4bf63b897bdc0644566c583}




Definition at line 134 of file queue.h.\index{queue.h@{queue.h}!SLIST\_\-ENTRY@{SLIST\_\-ENTRY}}
\index{SLIST\_\-ENTRY@{SLIST\_\-ENTRY}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-ENTRY]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-ENTRY(type)}\label{queue_8h_5dd8bb1cef024ac008680e7e3b660332}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct {                                                                \
        struct type *sle_next;  /* next element */                      \
}
\end{verbatim}
\end{Code}


Definition at line 126 of file queue.h.\index{queue.h@{queue.h}!SLIST\_\-FIRST@{SLIST\_\-FIRST}}
\index{SLIST\_\-FIRST@{SLIST\_\-FIRST}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-FIRST]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-FIRST(head)~((head) $\rightarrow$ slh\_\-first)}\label{queue_8h_91bac7d0d32e3ec56bc579ace45ed8cd}




Definition at line 136 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-FOREACH@{SLIST\_\-FOREACH}}
\index{SLIST\_\-FOREACH@{SLIST\_\-FOREACH}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-FOREACH]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-FOREACH(var, \/  head, \/  field)}\label{queue_8h_05db87878125c27e3060dd641aa3b0f4}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = SLIST_FIRST((head));                               \
            (var);                                                      \
            (var) = SLIST_NEXT((var), field))
\end{verbatim}
\end{Code}


Definition at line 138 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-HEAD@{SLIST\_\-HEAD}}
\index{SLIST\_\-HEAD@{SLIST\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-HEAD(name, \/  type)}\label{queue_8h_8224e40ea764bc857bab6f6d9c357dd9}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct name {                                                           \
        struct type *slh_first; /* first element */                     \
}
\end{verbatim}
\end{Code}


Definition at line 118 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-HEAD\_\-INITIALIZER@{SLIST\_\-HEAD\_\-INITIALIZER}}
\index{SLIST\_\-HEAD\_\-INITIALIZER@{SLIST\_\-HEAD\_\-INITIALIZER}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-HEAD\_\-INITIALIZER]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-HEAD\_\-INITIALIZER(head)~\{ NULL \}}\label{queue_8h_9ae2aca3d46e62be4cb1408bd946ef15}




Definition at line 123 of file queue.h.\index{queue.h@{queue.h}!SLIST\_\-INIT@{SLIST\_\-INIT}}
\index{SLIST\_\-INIT@{SLIST\_\-INIT}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-INIT]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-INIT(head)}\label{queue_8h_361ac8e88cf066cc4d46d28b54fd3031}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                            \
        SLIST_FIRST((head)) = NULL;                                     \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 143 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-INSERT\_\-AFTER@{SLIST\_\-INSERT\_\-AFTER}}
\index{SLIST\_\-INSERT\_\-AFTER@{SLIST\_\-INSERT\_\-AFTER}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-INSERT\_\-AFTER]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-INSERT\_\-AFTER(slistelm, \/  elm, \/  field)}\label{queue_8h_f1d994d9652ccbc41a60b747dfc15ea5}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field);       \
        SLIST_NEXT((slistelm), field) = (elm);                          \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 147 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-INSERT\_\-HEAD@{SLIST\_\-INSERT\_\-HEAD}}
\index{SLIST\_\-INSERT\_\-HEAD@{SLIST\_\-INSERT\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-INSERT\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-INSERT\_\-HEAD(head, \/  elm, \/  field)}\label{queue_8h_48df7439e09a419afabdd1f2f8551e73}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        SLIST_NEXT((elm), field) = SLIST_FIRST((head));                 \
        SLIST_FIRST((head)) = (elm);                                    \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 152 of file queue.h.

Referenced by scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-NEXT@{SLIST\_\-NEXT}}
\index{SLIST\_\-NEXT@{SLIST\_\-NEXT}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-NEXT]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-NEXT(elm, \/  field)~((elm) $\rightarrow$ field.sle\_\-next)}\label{queue_8h_7cd1d5ae37224ecee1f0b831eb73e7f4}




Definition at line 157 of file queue.h.

Referenced by dump\_\-events(), and scheduler\_\-interrupt().\index{queue.h@{queue.h}!SLIST\_\-REMOVE@{SLIST\_\-REMOVE}}
\index{SLIST\_\-REMOVE@{SLIST\_\-REMOVE}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-REMOVE]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-REMOVE(head, \/  elm, \/  type, \/  field)}\label{queue_8h_9c7950d61593ab9198524fca81b17ab0}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if (SLIST_FIRST((head)) == (elm)) {                             \
                SLIST_REMOVE_HEAD((head), field);                       \
        }                                                               \
        else {                                                          \
                struct type *curelm = SLIST_FIRST((head));              \
                while (SLIST_NEXT(curelm, field) != (elm))              \
                        curelm = SLIST_NEXT(curelm, field);             \
                SLIST_NEXT(curelm, field) =                             \
                    SLIST_NEXT(SLIST_NEXT(curelm, field), field);       \
        }                                                               \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 159 of file queue.h.\index{queue.h@{queue.h}!SLIST\_\-REMOVE\_\-HEAD@{SLIST\_\-REMOVE\_\-HEAD}}
\index{SLIST\_\-REMOVE\_\-HEAD@{SLIST\_\-REMOVE\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[SLIST\_\-REMOVE\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define SLIST\_\-REMOVE\_\-HEAD(head, \/  field)}\label{queue_8h_eb10c664372b3b680455274170f4c897}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                            \
        SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field);   \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 172 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-EMPTY@{STAILQ\_\-EMPTY}}
\index{STAILQ\_\-EMPTY@{STAILQ\_\-EMPTY}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-EMPTY]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-EMPTY(head)~((head) $\rightarrow$ stqh\_\-first == NULL)}\label{queue_8h_8427c8f43d09d73062cf6b37f303aff5}




Definition at line 196 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-ENTRY@{STAILQ\_\-ENTRY}}
\index{STAILQ\_\-ENTRY@{STAILQ\_\-ENTRY}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-ENTRY]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-ENTRY(type)}\label{queue_8h_765904f4fab4e7de1e2cd8ff351bc353}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct {                                                                \
        struct type *stqe_next; /* next element */                      \
}
\end{verbatim}
\end{Code}


Definition at line 188 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-FIRST@{STAILQ\_\-FIRST}}
\index{STAILQ\_\-FIRST@{STAILQ\_\-FIRST}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-FIRST]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-FIRST(head)~((head) $\rightarrow$ stqh\_\-first)}\label{queue_8h_3e2eb7535019a2829399b24744dd1a66}




Definition at line 198 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-FOREACH@{STAILQ\_\-FOREACH}}
\index{STAILQ\_\-FOREACH@{STAILQ\_\-FOREACH}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-FOREACH]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-FOREACH(var, \/  head, \/  field)}\label{queue_8h_77999ebdf5aaf7af8b8ea22bf208c432}


\textbf{Value:}

\begin{Code}\begin{verbatim}for((var) = STAILQ_FIRST((head));                               \
           (var);                                                       \
           (var) = STAILQ_NEXT((var), field))
\end{verbatim}
\end{Code}


Definition at line 200 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-HEAD@{STAILQ\_\-HEAD}}
\index{STAILQ\_\-HEAD@{STAILQ\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-HEAD(name, \/  type)}\label{queue_8h_7b54f0de61925e7cf33184c2ec24da14}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct name {                                                           \
        struct type *stqh_first;/* first element */                     \
        struct type **stqh_last;/* addr of last next element */         \
}
\end{verbatim}
\end{Code}


Definition at line 179 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-HEAD\_\-INITIALIZER@{STAILQ\_\-HEAD\_\-INITIALIZER}}
\index{STAILQ\_\-HEAD\_\-INITIALIZER@{STAILQ\_\-HEAD\_\-INITIALIZER}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-HEAD\_\-INITIALIZER]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-HEAD\_\-INITIALIZER(head)~\{ NULL, \&(head).stqh\_\-first \}}\label{queue_8h_3d41ce2c3f1dd21c0d4051d13204c321}




Definition at line 185 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-INIT@{STAILQ\_\-INIT}}
\index{STAILQ\_\-INIT@{STAILQ\_\-INIT}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-INIT]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-INIT(head)}\label{queue_8h_3b508a1c06ded6b4ce4b1feea7643c28}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                            \
        STAILQ_FIRST((head)) = NULL;                                    \
        (head)->stqh_last = &STAILQ_FIRST((head));                      \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 205 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-INSERT\_\-AFTER@{STAILQ\_\-INSERT\_\-AFTER}}
\index{STAILQ\_\-INSERT\_\-AFTER@{STAILQ\_\-INSERT\_\-AFTER}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-INSERT\_\-AFTER]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-INSERT\_\-AFTER(head, \/  tqelm, \/  elm, \/  field)}\label{queue_8h_f6ebdaf4ccbde5e464273b8079e832b3}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {            \
        if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
                (head)->stqh_last = &STAILQ_NEXT((elm), field);         \
        STAILQ_NEXT((tqelm), field) = (elm);                            \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 210 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-INSERT\_\-HEAD@{STAILQ\_\-INSERT\_\-HEAD}}
\index{STAILQ\_\-INSERT\_\-HEAD@{STAILQ\_\-INSERT\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-INSERT\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-INSERT\_\-HEAD(head, \/  elm, \/  field)}\label{queue_8h_ad3b1fb87b675bae75334acd958b57dc}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
                (head)->stqh_last = &STAILQ_NEXT((elm), field);         \
        STAILQ_FIRST((head)) = (elm);                                   \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 216 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-INSERT\_\-TAIL@{STAILQ\_\-INSERT\_\-TAIL}}
\index{STAILQ\_\-INSERT\_\-TAIL@{STAILQ\_\-INSERT\_\-TAIL}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-INSERT\_\-TAIL]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-INSERT\_\-TAIL(head, \/  elm, \/  field)}\label{queue_8h_7bc9a31418b55c5698be3e54e10bb484}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        STAILQ_NEXT((elm), field) = NULL;                               \
        *(head)->stqh_last = (elm);                                     \
        (head)->stqh_last = &STAILQ_NEXT((elm), field);                 \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 222 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-LAST@{STAILQ\_\-LAST}}
\index{STAILQ\_\-LAST@{STAILQ\_\-LAST}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-LAST]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-LAST(head, \/  type, \/  field)}\label{queue_8h_e18d422917aa0b8efb0f58d92a19ae41}


\textbf{Value:}

\begin{Code}\begin{verbatim}(STAILQ_EMPTY(head) ?                                           \
                NULL :                                                  \
                ((struct type *)                                        \
                ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
\end{verbatim}
\end{Code}


Definition at line 228 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-NEXT@{STAILQ\_\-NEXT}}
\index{STAILQ\_\-NEXT@{STAILQ\_\-NEXT}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-NEXT]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-NEXT(elm, \/  field)~((elm) $\rightarrow$ field.stqe\_\-next)}\label{queue_8h_d89ac472696d006112dface9c2d75e47}




Definition at line 234 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-REMOVE@{STAILQ\_\-REMOVE}}
\index{STAILQ\_\-REMOVE@{STAILQ\_\-REMOVE}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-REMOVE]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-REMOVE(head, \/  elm, \/  type, \/  field)}\label{queue_8h_2a0d6665f277f80bf301a16e6ab2403c}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if (STAILQ_FIRST((head)) == (elm)) {                            \
                STAILQ_REMOVE_HEAD(head, field);                        \
        }                                                               \
        else {                                                          \
                struct type *curelm = STAILQ_FIRST((head));             \
                while (STAILQ_NEXT(curelm, field) != (elm))             \
                        curelm = STAILQ_NEXT(curelm, field);            \
                if ((STAILQ_NEXT(curelm, field) =                       \
                     STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\
                        (head)->stqh_last = &STAILQ_NEXT((curelm), field);\
        }                                                               \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 236 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-REMOVE\_\-HEAD@{STAILQ\_\-REMOVE\_\-HEAD}}
\index{STAILQ\_\-REMOVE\_\-HEAD@{STAILQ\_\-REMOVE\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-REMOVE\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-REMOVE\_\-HEAD(head, \/  field)}\label{queue_8h_24c16c7c5c9908022bad7a98ddac9740}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                            \
        if ((STAILQ_FIRST((head)) =                                     \
             STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL)         \
                (head)->stqh_last = &STAILQ_FIRST((head));              \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 250 of file queue.h.\index{queue.h@{queue.h}!STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL@{STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL}}
\index{STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL@{STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL}!queue.h@{queue.h}}
\subsubsection[STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL]{\setlength{\rightskip}{0pt plus 5cm}\#define STAILQ\_\-REMOVE\_\-HEAD\_\-UNTIL(head, \/  elm, \/  field)}\label{queue_8h_ed257e38fe7f5f70c744109c29b3e960}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \
                (head)->stqh_last = &STAILQ_FIRST((head));              \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 256 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-EMPTY@{TAILQ\_\-EMPTY}}
\index{TAILQ\_\-EMPTY@{TAILQ\_\-EMPTY}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-EMPTY]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-EMPTY(head)~((head) $\rightarrow$ tqh\_\-first == NULL)}\label{queue_8h_c3c9da7ac712eacbbad5cc54d7a3477e}




Definition at line 347 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-ENTRY@{TAILQ\_\-ENTRY}}
\index{TAILQ\_\-ENTRY@{TAILQ\_\-ENTRY}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-ENTRY]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-ENTRY(type)}\label{queue_8h_f71bfd90dc9d00fb03545fe66c67d673}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct {                                                                \
        struct type *tqe_next;  /* next element */                      \
        struct type **tqe_prev; /* address of previous next element */  \
}
\end{verbatim}
\end{Code}


Definition at line 338 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-FIRST@{TAILQ\_\-FIRST}}
\index{TAILQ\_\-FIRST@{TAILQ\_\-FIRST}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-FIRST]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-FIRST(head)~((head) $\rightarrow$ tqh\_\-first)}\label{queue_8h_7d6894360bd1c41e0e6f6d84998c1362}




Definition at line 349 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-FOREACH@{TAILQ\_\-FOREACH}}
\index{TAILQ\_\-FOREACH@{TAILQ\_\-FOREACH}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-FOREACH]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-FOREACH(var, \/  head, \/  field)}\label{queue_8h_16e5fc168e7f3494d4b1df54447d871e}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = TAILQ_FIRST((head));                               \
            (var);                                                      \
            (var) = TAILQ_NEXT((var), field))
\end{verbatim}
\end{Code}


Definition at line 351 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-FOREACH\_\-REVERSE@{TAILQ\_\-FOREACH\_\-REVERSE}}
\index{TAILQ\_\-FOREACH\_\-REVERSE@{TAILQ\_\-FOREACH\_\-REVERSE}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-FOREACH\_\-REVERSE]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-FOREACH\_\-REVERSE(var, \/  head, \/  headname, \/  field)}\label{queue_8h_a7f65c910cd4616fcfa9723c5763b1a5}


\textbf{Value:}

\begin{Code}\begin{verbatim}for ((var) = TAILQ_LAST((head), headname);                      \
            (var);                                                      \
            (var) = TAILQ_PREV((var), headname, field))
\end{verbatim}
\end{Code}


Definition at line 356 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-HEAD@{TAILQ\_\-HEAD}}
\index{TAILQ\_\-HEAD@{TAILQ\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-HEAD(name, \/  type)}\label{queue_8h_4abce769a262e090c1f601605b9d6c76}


\textbf{Value:}

\begin{Code}\begin{verbatim}struct name {                                                           \
        struct type *tqh_first; /* first element */                     \
        struct type **tqh_last; /* addr of last next element */         \
}
\end{verbatim}
\end{Code}


Definition at line 329 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-HEAD\_\-INITIALIZER@{TAILQ\_\-HEAD\_\-INITIALIZER}}
\index{TAILQ\_\-HEAD\_\-INITIALIZER@{TAILQ\_\-HEAD\_\-INITIALIZER}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-HEAD\_\-INITIALIZER]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-HEAD\_\-INITIALIZER(head)~\{ NULL, \&(head).tqh\_\-first \}}\label{queue_8h_c269df7d4126ed9885156cbad2cbf8af}




Definition at line 335 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-INIT@{TAILQ\_\-INIT}}
\index{TAILQ\_\-INIT@{TAILQ\_\-INIT}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-INIT]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-INIT(head)}\label{queue_8h_449d224023780e46253b83b61e0a50a9}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                                            \
        TAILQ_FIRST((head)) = NULL;                                     \
        (head)->tqh_last = &TAILQ_FIRST((head));                        \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 361 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-INSERT\_\-AFTER@{TAILQ\_\-INSERT\_\-AFTER}}
\index{TAILQ\_\-INSERT\_\-AFTER@{TAILQ\_\-INSERT\_\-AFTER}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-INSERT\_\-AFTER]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-INSERT\_\-AFTER(head, \/  listelm, \/  elm, \/  field)}\label{queue_8h_f972e33f5eacef659ee0bf0a13ca518c}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {            \
        if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
                TAILQ_NEXT((elm), field)->field.tqe_prev =              \
                    &TAILQ_NEXT((elm), field);                          \
        else                                                            \
                (head)->tqh_last = &TAILQ_NEXT((elm), field);           \
        TAILQ_NEXT((listelm), field) = (elm);                           \
        (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field);          \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 366 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-INSERT\_\-BEFORE@{TAILQ\_\-INSERT\_\-BEFORE}}
\index{TAILQ\_\-INSERT\_\-BEFORE@{TAILQ\_\-INSERT\_\-BEFORE}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-INSERT\_\-BEFORE]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-INSERT\_\-BEFORE(listelm, \/  elm, \/  field)}\label{queue_8h_c6a41e17dbc7d8df1f8b353a036754ff}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        (elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \
        TAILQ_NEXT((elm), field) = (listelm);                           \
        *(listelm)->field.tqe_prev = (elm);                             \
        (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field);          \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 376 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-INSERT\_\-HEAD@{TAILQ\_\-INSERT\_\-HEAD}}
\index{TAILQ\_\-INSERT\_\-HEAD@{TAILQ\_\-INSERT\_\-HEAD}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-INSERT\_\-HEAD]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-INSERT\_\-HEAD(head, \/  elm, \/  field)}\label{queue_8h_f0f99e8f322ea4eef2d9deaa505239a6}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL)   \
                TAILQ_FIRST((head))->field.tqe_prev =                   \
                    &TAILQ_NEXT((elm), field);                          \
        else                                                            \
                (head)->tqh_last = &TAILQ_NEXT((elm), field);           \
        TAILQ_FIRST((head)) = (elm);                                    \
        (elm)->field.tqe_prev = &TAILQ_FIRST((head));                   \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 383 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-INSERT\_\-TAIL@{TAILQ\_\-INSERT\_\-TAIL}}
\index{TAILQ\_\-INSERT\_\-TAIL@{TAILQ\_\-INSERT\_\-TAIL}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-INSERT\_\-TAIL]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-INSERT\_\-TAIL(head, \/  elm, \/  field)}\label{queue_8h_512bee16b46f601078c96c776d2648c3}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                    \
        TAILQ_NEXT((elm), field) = NULL;                                \
        (elm)->field.tqe_prev = (head)->tqh_last;                       \
        *(head)->tqh_last = (elm);                                      \
        (head)->tqh_last = &TAILQ_NEXT((elm), field);                   \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 393 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-LAST@{TAILQ\_\-LAST}}
\index{TAILQ\_\-LAST@{TAILQ\_\-LAST}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-LAST]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-LAST(head, \/  headname)~($\ast$(((struct headname $\ast$)((head) $\rightarrow$ tqh\_\-last)) $\rightarrow$ tqh\_\-last))}\label{queue_8h_c9154a9aebb3c15a3f2356349a1cc14f}




Definition at line 400 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-NEXT@{TAILQ\_\-NEXT}}
\index{TAILQ\_\-NEXT@{TAILQ\_\-NEXT}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-NEXT]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-NEXT(elm, \/  field)~((elm) $\rightarrow$ field.tqe\_\-next)}\label{queue_8h_bd57fe9bdea6007a602f8c7d61bd5265}




Definition at line 403 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-PREV@{TAILQ\_\-PREV}}
\index{TAILQ\_\-PREV@{TAILQ\_\-PREV}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-PREV]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-PREV(elm, \/  headname, \/  field)~($\ast$(((struct headname $\ast$)((elm) $\rightarrow$ field.tqe\_\-prev)) $\rightarrow$ tqh\_\-last))}\label{queue_8h_524f93a0c21c390683fab4c27e840a10}




Definition at line 405 of file queue.h.\index{queue.h@{queue.h}!TAILQ\_\-REMOVE@{TAILQ\_\-REMOVE}}
\index{TAILQ\_\-REMOVE@{TAILQ\_\-REMOVE}!queue.h@{queue.h}}
\subsubsection[TAILQ\_\-REMOVE]{\setlength{\rightskip}{0pt plus 5cm}\#define TAILQ\_\-REMOVE(head, \/  elm, \/  field)}\label{queue_8h_aae87ca18c28066e1a96221e762d1209}


\textbf{Value:}

\begin{Code}\begin{verbatim}do {                            \
        if ((TAILQ_NEXT((elm), field)) != NULL)                         \
                TAILQ_NEXT((elm), field)->field.tqe_prev =              \
                    (elm)->field.tqe_prev;                              \
        else                                                            \
                (head)->tqh_last = (elm)->field.tqe_prev;               \
        *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field);              \
} while (0)
\end{verbatim}
\end{Code}


Definition at line 408 of file queue.h.