\hypertarget{group___mmal_list}{}\section{Generic Linked List}
\label{group___mmal_list}\index{Generic Linked List@{Generic Linked List}}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}
\item 
struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} \mbox{\hyperlink{group___mmal_list_ga8c7901e4695813f8bbf0bba5ecfa12b0}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}
\item 
typedef struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} \mbox{\hyperlink{group___mmal_list_ga7f98da38f7ebe94c84a4b56115c71058}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}
\item 
typedef int($\ast$ \mbox{\hyperlink{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}}) (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$lhs, \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$rhs)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$ \mbox{\hyperlink{group___mmal_list_ga6252c5872bee490e4ff6c6db95b662c9}{mmal\+\_\+list\+\_\+create}} (void)
\item 
void \mbox{\hyperlink{group___mmal_list_gacfa780fae1e7c2af714c7297efb3ddaa}{mmal\+\_\+list\+\_\+destroy}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list)
\item 
\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$ \mbox{\hyperlink{group___mmal_list_gaaec0d37177e8dab0111063e233b07eef}{mmal\+\_\+list\+\_\+pop\+\_\+back}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list)
\item 
\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$ \mbox{\hyperlink{group___mmal_list_ga9025d7388fe303e95721655686dcb9a3}{mmal\+\_\+list\+\_\+pop\+\_\+front}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list)
\item 
void \mbox{\hyperlink{group___mmal_list_ga9697233769afab03d830823460ac6e2f}{mmal\+\_\+list\+\_\+push\+\_\+front}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list, \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$element)
\item 
void \mbox{\hyperlink{group___mmal_list_gaf267e34d1a1d69e66689f3b1f0b1b216}{mmal\+\_\+list\+\_\+push\+\_\+back}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list, \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$element)
\item 
void \mbox{\hyperlink{group___mmal_list_gae1335e380338750c7f3b081d1b3445c8}{mmal\+\_\+list\+\_\+insert}} (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$list, \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$element, \mbox{\hyperlink{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}} compare)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This provides a thread-\/safe implementation of a linked list which can be used with any data type. 

\subsection{Typedef Documentation}
\mbox{\Hypertarget{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}\label{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}} 
\index{Generic Linked List@{Generic Linked List}!M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}}
\index{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}{MMAL\_LIST\_COMPARE\_T}}
{\footnotesize\ttfamily typedef int($\ast$ M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T) (\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$lhs, \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$rhs)}

List comparison function. This is supplied by a client when inserting an element in the middle of the list. The list will always insert a smaller element in front of a larger element.

\begin{DoxyReturn}{Returns}
T\+R\+UE\+: lhs $<$ rhs F\+A\+L\+SE\+: lhs $>$= rhs 
\end{DoxyReturn}
\mbox{\Hypertarget{group___mmal_list_ga8c7901e4695813f8bbf0bba5ecfa12b0}\label{group___mmal_list_ga8c7901e4695813f8bbf0bba5ecfa12b0}} 
\index{Generic Linked List@{Generic Linked List}!M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}
\index{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}{MMAL\_LIST\_ELEMENT\_T}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}  \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}}

Single element in the list \mbox{\Hypertarget{group___mmal_list_ga7f98da38f7ebe94c84a4b56115c71058}\label{group___mmal_list_ga7f98da38f7ebe94c84a4b56115c71058}} 
\index{Generic Linked List@{Generic Linked List}!M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}
\index{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T@{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}{MMAL\_LIST\_T}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}  \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}}

Linked list type. Clients shouldn\textquotesingle{}t modify this directly. Use the provided A\+PI functions to add new elements. The public members are only for debug purposes. 

\subsection{Function Documentation}
\mbox{\Hypertarget{group___mmal_list_ga6252c5872bee490e4ff6c6db95b662c9}\label{group___mmal_list_ga6252c5872bee490e4ff6c6db95b662c9}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+create@{mmal\+\_\+list\+\_\+create}}
\index{mmal\+\_\+list\+\_\+create@{mmal\+\_\+list\+\_\+create}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+create()}{mmal\_list\_create()}}
{\footnotesize\ttfamily \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}}$\ast$ mmal\+\_\+list\+\_\+create (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Create a new linked list.

\begin{DoxyReturn}{Returns}
Pointer to new queue (N\+U\+LL on failure). 
\end{DoxyReturn}
\mbox{\Hypertarget{group___mmal_list_gacfa780fae1e7c2af714c7297efb3ddaa}\label{group___mmal_list_gacfa780fae1e7c2af714c7297efb3ddaa}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+destroy@{mmal\+\_\+list\+\_\+destroy}}
\index{mmal\+\_\+list\+\_\+destroy@{mmal\+\_\+list\+\_\+destroy}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+destroy()}{mmal\_list\_destroy()}}
{\footnotesize\ttfamily void mmal\+\_\+list\+\_\+destroy (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list }\end{DoxyParamCaption})}

Destroy a linked list.


\begin{DoxyParams}{Parameters}
{\em list} & List to destroy \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group___mmal_list_gae1335e380338750c7f3b081d1b3445c8}\label{group___mmal_list_gae1335e380338750c7f3b081d1b3445c8}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+insert@{mmal\+\_\+list\+\_\+insert}}
\index{mmal\+\_\+list\+\_\+insert@{mmal\+\_\+list\+\_\+insert}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+insert()}{mmal\_list\_insert()}}
{\footnotesize\ttfamily void mmal\+\_\+list\+\_\+insert (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list,  }\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$}]{element,  }\item[{\mbox{\hyperlink{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+T}}}]{compare }\end{DoxyParamCaption})}

Insert an element into the list. The location where the element is inserted is determined using the supplied comparison function. Smaller elements are inserted in front of larger elements.


\begin{DoxyParams}{Parameters}
{\em list} & List to add to \\
\hline
{\em element} & The element to insert \\
\hline
{\em compare} & Comparison function supplied by the client \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group___mmal_list_gaaec0d37177e8dab0111063e233b07eef}\label{group___mmal_list_gaaec0d37177e8dab0111063e233b07eef}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+pop\+\_\+back@{mmal\+\_\+list\+\_\+pop\+\_\+back}}
\index{mmal\+\_\+list\+\_\+pop\+\_\+back@{mmal\+\_\+list\+\_\+pop\+\_\+back}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+pop\+\_\+back()}{mmal\_list\_pop\_back()}}
{\footnotesize\ttfamily \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}$\ast$ mmal\+\_\+list\+\_\+pop\+\_\+back (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list }\end{DoxyParamCaption})}

Remove the last element in the list.


\begin{DoxyParams}{Parameters}
{\em list} & List to remove from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the last element (or N\+U\+LL if empty) 
\end{DoxyReturn}
\mbox{\Hypertarget{group___mmal_list_ga9025d7388fe303e95721655686dcb9a3}\label{group___mmal_list_ga9025d7388fe303e95721655686dcb9a3}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+pop\+\_\+front@{mmal\+\_\+list\+\_\+pop\+\_\+front}}
\index{mmal\+\_\+list\+\_\+pop\+\_\+front@{mmal\+\_\+list\+\_\+pop\+\_\+front}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+pop\+\_\+front()}{mmal\_list\_pop\_front()}}
{\footnotesize\ttfamily \mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}}$\ast$ mmal\+\_\+list\+\_\+pop\+\_\+front (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list }\end{DoxyParamCaption})}

Remove the first element in the list.


\begin{DoxyParams}{Parameters}
{\em list} & List to remove from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the first element (or N\+U\+LL if empty) 
\end{DoxyReturn}
\mbox{\Hypertarget{group___mmal_list_gaf267e34d1a1d69e66689f3b1f0b1b216}\label{group___mmal_list_gaf267e34d1a1d69e66689f3b1f0b1b216}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+push\+\_\+back@{mmal\+\_\+list\+\_\+push\+\_\+back}}
\index{mmal\+\_\+list\+\_\+push\+\_\+back@{mmal\+\_\+list\+\_\+push\+\_\+back}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+push\+\_\+back()}{mmal\_list\_push\_back()}}
{\footnotesize\ttfamily void mmal\+\_\+list\+\_\+push\+\_\+back (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list,  }\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$}]{element }\end{DoxyParamCaption})}

Add an element to the back of the list.


\begin{DoxyParams}{Parameters}
{\em list} & List to add to \\
\hline
{\em element} & The element to add \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group___mmal_list_ga9697233769afab03d830823460ac6e2f}\label{group___mmal_list_ga9697233769afab03d830823460ac6e2f}} 
\index{Generic Linked List@{Generic Linked List}!mmal\+\_\+list\+\_\+push\+\_\+front@{mmal\+\_\+list\+\_\+push\+\_\+front}}
\index{mmal\+\_\+list\+\_\+push\+\_\+front@{mmal\+\_\+list\+\_\+push\+\_\+front}!Generic Linked List@{Generic Linked List}}
\subsubsection{\texorpdfstring{mmal\+\_\+list\+\_\+push\+\_\+front()}{mmal\_list\_push\_front()}}
{\footnotesize\ttfamily void mmal\+\_\+list\+\_\+push\+\_\+front (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+T}} $\ast$}]{list,  }\item[{\mbox{\hyperlink{struct_m_m_a_l___l_i_s_t___e_l_e_m_e_n_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+T}} $\ast$}]{element }\end{DoxyParamCaption})}

Add an element to the front of the list.


\begin{DoxyParams}{Parameters}
{\em list} & List to add to \\
\hline
{\em element} & The element to add \\
\hline
\end{DoxyParams}
