\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 \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 \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 \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} \hyperlink{group___mmal_list_ga8c7901e4695813f8bbf0bba5ecfa12b0}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}
\item 
typedef struct \hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} \hyperlink{group___mmal_list_ga7f98da38f7ebe94c84a4b56115c71058}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T}
\item 
typedef int($\ast$ \hyperlink{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+\+T}) (\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, \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 
\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$ \hyperlink{group___mmal_list_ga6252c5872bee490e4ff6c6db95b662c9}{mmal\+\_\+list\+\_\+create} (void)
\item 
void \hyperlink{group___mmal_list_gacfa780fae1e7c2af714c7297efb3ddaa}{mmal\+\_\+list\+\_\+destroy} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list)
\item 
\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$ \hyperlink{group___mmal_list_gaaec0d37177e8dab0111063e233b07eef}{mmal\+\_\+list\+\_\+pop\+\_\+back} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list)
\item 
\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$ \hyperlink{group___mmal_list_ga9025d7388fe303e95721655686dcb9a3}{mmal\+\_\+list\+\_\+pop\+\_\+front} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list)
\item 
void \hyperlink{group___mmal_list_ga9697233769afab03d830823460ac6e2f}{mmal\+\_\+list\+\_\+push\+\_\+front} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list, \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 \hyperlink{group___mmal_list_gaf267e34d1a1d69e66689f3b1f0b1b216}{mmal\+\_\+list\+\_\+push\+\_\+back} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list, \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 \hyperlink{group___mmal_list_gae1335e380338750c7f3b081d1b3445c8}{mmal\+\_\+list\+\_\+insert} (\hyperlink{struct_m_m_a_l___l_i_s_t___t}{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$list, \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, \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}
\hypertarget{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[{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+\+T}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+\+T) ({\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T} $\ast$lhs, {\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T} $\ast$rhs)}\label{group___mmal_list_ga5a6d7f0b299bc03aa2a88db4439665a2}
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\+U\+E\+: lhs $<$ rhs F\+A\+L\+S\+E\+: lhs $>$= rhs 
\end{DoxyReturn}
\hypertarget{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[{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}  {\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}}\label{group___mmal_list_ga8c7901e4695813f8bbf0bba5ecfa12b0}
Single element in the list \hypertarget{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[{M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T}  {\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T}}\label{group___mmal_list_ga7f98da38f7ebe94c84a4b56115c71058}
Linked list type. Clients shouldn\textquotesingle{}t modify this directly. Use the provided A\+P\+I functions to add new elements. The public members are only for debug purposes. 

\subsection{Function Documentation}
\hypertarget{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[{mmal\+\_\+list\+\_\+create}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T}$\ast$ mmal\+\_\+list\+\_\+create (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group___mmal_list_ga6252c5872bee490e4ff6c6db95b662c9}
Create a new linked list.

\begin{DoxyReturn}{Returns}
Pointer to new queue (N\+U\+L\+L on failure). 
\end{DoxyReturn}
\hypertarget{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[{mmal\+\_\+list\+\_\+destroy}]{\setlength{\rightskip}{0pt plus 5cm}void mmal\+\_\+list\+\_\+destroy (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list}
\end{DoxyParamCaption}
)}\label{group___mmal_list_gacfa780fae1e7c2af714c7297efb3ddaa}
Destroy a linked list.


\begin{DoxyParams}{Parameters}
{\em list} & List to destroy \\
\hline
\end{DoxyParams}
\hypertarget{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[{mmal\+\_\+list\+\_\+insert}]{\setlength{\rightskip}{0pt plus 5cm}void mmal\+\_\+list\+\_\+insert (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list, }
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T} $\ast$}]{element, }
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+C\+O\+M\+P\+A\+R\+E\+\_\+\+T}}]{compare}
\end{DoxyParamCaption}
)}\label{group___mmal_list_gae1335e380338750c7f3b081d1b3445c8}
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}
\hypertarget{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[{mmal\+\_\+list\+\_\+pop\+\_\+back}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}$\ast$ mmal\+\_\+list\+\_\+pop\+\_\+back (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list}
\end{DoxyParamCaption}
)}\label{group___mmal_list_gaaec0d37177e8dab0111063e233b07eef}
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\+L\+L if empty) 
\end{DoxyReturn}
\hypertarget{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[{mmal\+\_\+list\+\_\+pop\+\_\+front}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T}$\ast$ mmal\+\_\+list\+\_\+pop\+\_\+front (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list}
\end{DoxyParamCaption}
)}\label{group___mmal_list_ga9025d7388fe303e95721655686dcb9a3}
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\+L\+L if empty) 
\end{DoxyReturn}
\hypertarget{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[{mmal\+\_\+list\+\_\+push\+\_\+back}]{\setlength{\rightskip}{0pt plus 5cm}void mmal\+\_\+list\+\_\+push\+\_\+back (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list, }
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T} $\ast$}]{element}
\end{DoxyParamCaption}
)}\label{group___mmal_list_gaf267e34d1a1d69e66689f3b1f0b1b216}
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}
\hypertarget{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[{mmal\+\_\+list\+\_\+push\+\_\+front}]{\setlength{\rightskip}{0pt plus 5cm}void mmal\+\_\+list\+\_\+push\+\_\+front (
\begin{DoxyParamCaption}
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+T} $\ast$}]{list, }
\item[{{\bf M\+M\+A\+L\+\_\+\+L\+I\+S\+T\+\_\+\+E\+L\+E\+M\+E\+N\+T\+\_\+\+T} $\ast$}]{element}
\end{DoxyParamCaption}
)}\label{group___mmal_list_ga9697233769afab03d830823460ac6e2f}
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}
