\hypertarget{opal__list_8h}{\section{opal/class/opal\+\_\+list.h File Reference}
\label{opal__list_8h}\index{opal/class/opal\+\_\+list.\+h@{opal/class/opal\+\_\+list.\+h}}
}


The \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} interface is used to provide a generic doubly-\/linked list container for Open M\+P\+I.  


{\ttfamily \#include \char`\"{}opal\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include $<$stdlib.\+h$>$}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}
\item 
struct \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{opal__list_8h_abe71d4b12f7e5bbf7b056a3ae6c6ec3a}{opal\+\_\+list\+\_\+get\+\_\+next}(item)~((item) ? ((\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}$\ast$) ((\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}$\ast$)(item))-\/$>$opal\+\_\+list\+\_\+next) \+: N\+U\+L\+L)
\begin{DoxyCompactList}\small\item\em Get the next item in a list. \end{DoxyCompactList}\item 
\#define \hyperlink{opal__list_8h_aad71b0e8a569e611b36e0a10b66e8d88}{opal\+\_\+list\+\_\+get\+\_\+prev}(item)~((item) ? ((\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}$\ast$) ((\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}$\ast$)(item))-\/$>$opal\+\_\+list\+\_\+prev) \+: N\+U\+L\+L)
\begin{DoxyCompactList}\small\item\em Get the next item in a list. \end{DoxyCompactList}\item 
\#define \hyperlink{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{opal\+\_\+list\+\_\+append}(l, i)~\+\_\+opal\+\_\+list\+\_\+append(l,i)
\begin{DoxyCompactList}\small\item\em Append an item to the end of the list. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__list_8h_a845fd548d811f7f4773a9765966bfc30}{typedef struct \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} \hyperlink{opal__list_8h_a845fd548d811f7f4773a9765966bfc30}{opal\+\_\+list\+\_\+item\+\_\+t}}\label{opal__list_8h_a845fd548d811f7f4773a9765966bfc30}

\begin{DoxyCompactList}\small\item\em Base type for items that are put in a list (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t}) containers. \end{DoxyCompactList}\item 
\hypertarget{opal__list_8h_a46203e8e812e05f0ff95cd72ba4f958b}{typedef struct \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} \hyperlink{opal__list_8h_a46203e8e812e05f0ff95cd72ba4f958b}{opal\+\_\+list\+\_\+t}}\label{opal__list_8h_a46203e8e812e05f0ff95cd72ba4f958b}

\begin{DoxyCompactList}\small\item\em List container type. \end{DoxyCompactList}\item 
typedef int($\ast$ \hyperlink{opal__list_8h_aeaad88aa7c7f86b5cb23877b86bb96e3}{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t} )(\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$$\ast$a, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$$\ast$b)
\begin{DoxyCompactList}\small\item\em Comparison function for \hyperlink{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{opal\+\_\+list\+\_\+sort()}, below. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__list_8h_aee9ae994ed8e756ad792daf5dbb3c0d8}{B\+E\+G\+I\+N\+\_\+\+C\+\_\+\+D\+E\+C\+L\+S O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t})}\label{opal__list_8h_aee9ae994ed8e756ad792daf5dbb3c0d8}

\item 
\hypertarget{opal__list_8h_a0c0c876c41697895ac64a8d8f2847a9a}{O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t})}\label{opal__list_8h_a0c0c876c41697895ac64a8d8f2847a9a}

\item 
static bool \hyperlink{opal__list_8h_abe32e4699740692ecd282d0aff5e47fa}{opal\+\_\+list\+\_\+is\+\_\+empty} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Check for empty list. \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_a260db4b3b9dffc1674298932c62b15e2}{opal\+\_\+list\+\_\+get\+\_\+first} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Return the first item on the list (does not remove it). \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_ac8de8a419e0cb2b14b227e047a1bd552}{opal\+\_\+list\+\_\+get\+\_\+last} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Return the last item on the list (does not remove it). \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_a6592edc55b4211fafcdeb9dca534a215}{opal\+\_\+list\+\_\+get\+\_\+begin} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Return the beginning of the list; an invalid list entry suitable for comparison only. \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_aa3fe31283c2203f82275bb9695002014}{opal\+\_\+list\+\_\+get\+\_\+end} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Return the end of the list; an invalid list entry suitable for comparison only. \end{DoxyCompactList}\item 
static size\+\_\+t \hyperlink{opal__list_8h_aec770d8385a74a16b713bd0f8028e531}{opal\+\_\+list\+\_\+get\+\_\+size} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Return the number of items in a list. \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_ac12b27d060717880b8cfffffa2f85ecb}{opal\+\_\+list\+\_\+remove\+\_\+item} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$item)
\begin{DoxyCompactList}\small\item\em Remove an item from a list. \end{DoxyCompactList}\item 
\hypertarget{opal__list_8h_acf380ea9c237bb2979309f0a3a5fb07b}{static void {\bfseries \+\_\+opal\+\_\+list\+\_\+append} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$item)}\label{opal__list_8h_acf380ea9c237bb2979309f0a3a5fb07b}

\item 
static void \hyperlink{opal__list_8h_aa3769e688e697a51f4db6bba5de2f557}{opal\+\_\+list\+\_\+prepend} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$item)
\begin{DoxyCompactList}\small\item\em Prepend an item to the beginning of the list. \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_a85320676c6416a4c4a6c4219dad645ac}{opal\+\_\+list\+\_\+remove\+\_\+first} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Remove the first item from the list and return it. \end{DoxyCompactList}\item 
static \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$ \hyperlink{opal__list_8h_a650c882f43d59605ca8ada0728537f3a}{opal\+\_\+list\+\_\+remove\+\_\+last} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list)
\begin{DoxyCompactList}\small\item\em Remove the last item from the list and return it. \end{DoxyCompactList}\item 
static void \hyperlink{opal__list_8h_a751bbd61726a33c214291a5feef1f5da}{opal\+\_\+list\+\_\+insert\+\_\+pos} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$pos, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$item)
\begin{DoxyCompactList}\small\item\em Add an item to the list before a given element. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool \hyperlink{opal__list_8h_a28470260a82c514b21d71a4acca23b62}{opal\+\_\+list\+\_\+insert} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$item, long long idx)
\begin{DoxyCompactList}\small\item\em Add an item to the list at a specific index location in the list. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void \hyperlink{opal__list_8h_acad40f223fd30c98c28b958df5b0f318}{opal\+\_\+list\+\_\+join} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$thislist, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$pos, \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$xlist)
\begin{DoxyCompactList}\small\item\em Join a list into another list. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void \hyperlink{opal__list_8h_a74a1d8cf6d75ee3ffd16b5ef8eb1facb}{opal\+\_\+list\+\_\+splice} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$thislist, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$pos, \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$xlist, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$first, \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} $\ast$last)
\begin{DoxyCompactList}\small\item\em Splice a list into another list. \end{DoxyCompactList}\item 
O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{opal\+\_\+list\+\_\+sort} (\hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} $\ast$list, \hyperlink{opal__list_8h_aeaad88aa7c7f86b5cb23877b86bb96e3}{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t} compare)
\begin{DoxyCompactList}\small\item\em Sort a list with a provided compare function. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} interface is used to provide a generic doubly-\/linked list container for Open M\+P\+I. 

It was inspired by (but is slightly different than) the Stantard Template Library (S\+T\+L) std\+::list class. One notable difference from std\+::list is that when an \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} is destroyed, all of the \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} objects that it contains are orphaned -- they are {\itshape not} destroyed.

The general idea is that \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} objects can be put on an \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t}. Hence, you create a new type that derives from \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}; this new type can then be used with \hyperlink{structopal__list__t}{opal\+\_\+list\+\_\+t} containers.

N\+O\+T\+E\+: \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} instances can only be on {\itshape one} list at a time. Specifically, if you add an \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} to one list, and then add it to another list (without first removing it from the first list), you will effectively be hosing the first list. You have been warned.

If O\+P\+A\+L\+\_\+\+E\+N\+A\+B\+L\+E\+\_\+\+D\+E\+B\+U\+G is true, a bunch of checks occur, including some spot checks for a debugging reference count in an attempt to ensure that an \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} is only one {\itshape one} list at a time. Given the highly concurrent nature of this class, these spot checks cannot guarantee that an item is only one list at a time. Specifically, since it is a desirable attribute of this class to not use locks for normal operations, it is possible that two threads may \mbox{[}erroneously\mbox{]} modify an \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} concurrently.

The only way to guarantee that a debugging reference count is valid for the duration of an operation is to lock the item\+\_\+t during the operation. But this fundamentally changes the desirable attribute of this class (i.\+e., no locks). So all we can do is spot-\/check the reference count in a bunch of places and check that it is still the value that we think it should be. But this doesn't mean that you can run into \char`\"{}unlucky\char`\"{} cases where two threads are concurrently modifying an item\+\_\+t, but all the spot checks still return the \char`\"{}right\char`\"{} values. All we can do is hope that we have enough spot checks to statistically drive down the possibility of the unlucky cases happening. 

\subsection{Macro Definition Documentation}
\hypertarget{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+append@{opal\+\_\+list\+\_\+append}}
\index{opal\+\_\+list\+\_\+append@{opal\+\_\+list\+\_\+append}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+append}]{\setlength{\rightskip}{0pt plus 5cm}\#define opal\+\_\+list\+\_\+append(
\begin{DoxyParamCaption}
\item[{}]{l, }
\item[{}]{i}
\end{DoxyParamCaption}
)~\+\_\+opal\+\_\+list\+\_\+append(l,i)}}\label{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}


Append an item to the end of the list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container \\
\hline
{\em item} & The item to append\\
\hline
\end{DoxyParams}
This is an O(1) operation to append an item to the end of a list. The \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} is not \hyperlink{opal__object_8h_a67f8f5772cbe2caccc9b38fb435dfaf2}{O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N()}'ed; it is assumed that \char`\"{}ownership\char`\"{} of the item is passed from the caller to the list.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

Referenced by append\+\_\+frag\+\_\+to\+\_\+list(), mca\+\_\+allocator\+\_\+basic\+\_\+alloc(), mca\+\_\+allocator\+\_\+basic\+\_\+free(), mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+btl\+\_\+elan\+\_\+component\+\_\+progress(), mca\+\_\+btl\+\_\+sctp\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+tcp\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+ud\+\_\+component\+\_\+init(), mca\+\_\+btl\+\_\+udapl\+\_\+put(), mca\+\_\+btl\+\_\+vader\+\_\+send(), mca\+\_\+btl\+\_\+vader\+\_\+sendi(), mca\+\_\+coll\+\_\+base\+\_\+find\+\_\+available(), mca\+\_\+io\+\_\+base\+\_\+find\+\_\+available(), mca\+\_\+mpool\+\_\+grdma\+\_\+deregister(), mca\+\_\+mpool\+\_\+grdma\+\_\+release\+\_\+memory(), mca\+\_\+mpool\+\_\+rdma\+\_\+deregister(), mca\+\_\+mpool\+\_\+rdma\+\_\+release\+\_\+memory(), mca\+\_\+oob\+\_\+base\+\_\+init(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+complete(), mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+send(), mca\+\_\+oob\+\_\+tcp\+\_\+recv\+\_\+nb(), mca\+\_\+pml\+\_\+bfo\+\_\+error\+\_\+pending\+\_\+packets(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), ompi\+\_\+op\+\_\+base\+\_\+find\+\_\+available(), ompi\+\_\+proc\+\_\+init(), opal\+\_\+cmd\+\_\+line\+\_\+parse(), opal\+\_\+graph\+\_\+add\+\_\+edge(), opal\+\_\+graph\+\_\+add\+\_\+vertex(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint64(), opal\+\_\+list\+\_\+sort(), orte\+\_\+odls\+\_\+base\+\_\+open(), orte\+\_\+ras\+\_\+gridengine\+\_\+allocate(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_abe71d4b12f7e5bbf7b056a3ae6c6ec3a}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+next@{opal\+\_\+list\+\_\+get\+\_\+next}}
\index{opal\+\_\+list\+\_\+get\+\_\+next@{opal\+\_\+list\+\_\+get\+\_\+next}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+next}]{\setlength{\rightskip}{0pt plus 5cm}\#define opal\+\_\+list\+\_\+get\+\_\+next(
\begin{DoxyParamCaption}
\item[{}]{item}
\end{DoxyParamCaption}
)~((item) ? (({\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$) (({\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$)(item))-\/$>$opal\+\_\+list\+\_\+next) \+: N\+U\+L\+L)}}\label{opal__list_8h_abe71d4b12f7e5bbf7b056a3ae6c6ec3a}


Get the next item in a list. 


\begin{DoxyParams}{Parameters}
{\em item} & A list item.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The next item in the list 
\end{DoxyReturn}


Referenced by mca\+\_\+allocator\+\_\+basic\+\_\+alloc(), mca\+\_\+allocator\+\_\+basic\+\_\+free(), mca\+\_\+allocator\+\_\+component\+\_\+lookup(), mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+mpool\+\_\+base\+\_\+alloc(), mca\+\_\+oob\+\_\+base\+\_\+init(), mca\+\_\+oob\+\_\+base\+\_\+module\+\_\+init(), mca\+\_\+oob\+\_\+tcp\+\_\+get\+\_\+addr(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+post(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+recv(), mca\+\_\+oob\+\_\+tcp\+\_\+recv\+\_\+cancel(), mca\+\_\+pml\+\_\+bfo\+\_\+is\+\_\+duplicate\+\_\+msg(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find\+\_\+all(), ompi\+\_\+proc\+\_\+all(), ompi\+\_\+proc\+\_\+complete\+\_\+init(), ompi\+\_\+proc\+\_\+find(), ompi\+\_\+proc\+\_\+refresh(), ompi\+\_\+proc\+\_\+world(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+ninsts(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+param(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+usage\+\_\+msg(), opal\+\_\+graph\+\_\+add\+\_\+edge(), opal\+\_\+graph\+\_\+add\+\_\+vertex(), opal\+\_\+graph\+\_\+adjacent(), opal\+\_\+graph\+\_\+dijkstra(), opal\+\_\+graph\+\_\+duplicate(), opal\+\_\+graph\+\_\+find\+\_\+vertex(), opal\+\_\+graph\+\_\+get\+\_\+adjacent\+\_\+vertices(), opal\+\_\+graph\+\_\+get\+\_\+graph\+\_\+vertices(), opal\+\_\+graph\+\_\+print(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint64(), opal\+\_\+list\+\_\+get\+\_\+size(), opal\+\_\+list\+\_\+splice(), orte\+\_\+notifier\+\_\+base\+\_\+select(), orte\+\_\+odls\+\_\+base\+\_\+default\+\_\+signal\+\_\+local\+\_\+procs(), orte\+\_\+ras\+\_\+gridengine\+\_\+allocate(), orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes(), orte\+\_\+rml\+\_\+base\+\_\+select(), orte\+\_\+sensor\+\_\+base\+\_\+select(), and orte\+\_\+util\+\_\+add\+\_\+hostfile\+\_\+nodes().

\hypertarget{opal__list_8h_aad71b0e8a569e611b36e0a10b66e8d88}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+prev@{opal\+\_\+list\+\_\+get\+\_\+prev}}
\index{opal\+\_\+list\+\_\+get\+\_\+prev@{opal\+\_\+list\+\_\+get\+\_\+prev}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+prev}]{\setlength{\rightskip}{0pt plus 5cm}\#define opal\+\_\+list\+\_\+get\+\_\+prev(
\begin{DoxyParamCaption}
\item[{}]{item}
\end{DoxyParamCaption}
)~((item) ? (({\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$) (({\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$)(item))-\/$>$opal\+\_\+list\+\_\+prev) \+: N\+U\+L\+L)}}\label{opal__list_8h_aad71b0e8a569e611b36e0a10b66e8d88}


Get the next item in a list. 


\begin{DoxyParams}{Parameters}
{\em item} & A list item.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The next item in the list 
\end{DoxyReturn}


Referenced by mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().



\subsection{Typedef Documentation}
\hypertarget{opal__list_8h_aeaad88aa7c7f86b5cb23877b86bb96e3}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t@{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t}}
\index{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t@{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t)({\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$$\ast$a, {\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$$\ast$b)}}\label{opal__list_8h_aeaad88aa7c7f86b5cb23877b86bb96e3}


Comparison function for \hyperlink{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{opal\+\_\+list\+\_\+sort()}, below. 


\begin{DoxyParams}{Parameters}
{\em a} & Pointer to a pointer to an \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}. Explanation below. \\
\hline
{\em b} & Pointer to a pointer to an \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}. Explanation below. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & if {\itshape a} is greater than {\itshape b} \\
\hline
{\em 0} & if {\itshape a} is equal to {\itshape b} \\
\hline
{\em 11} & if {\itshape a} is less than {\itshape b} \\
\hline
\end{DoxyRetVals}
This function is invoked by qsort(3) from within \hyperlink{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{opal\+\_\+list\+\_\+sort()}. It is important to understand what \hyperlink{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{opal\+\_\+list\+\_\+sort()} does before invoking qsort, so go read that documentation first.

The important thing to realize here is that a and b will be {\itshape double} pointers to the items that you need to compare. Here's a sample compare function to illustrate this point\+:

static int compare(opal\+\_\+list\+\_\+item\+\_\+t $\ast$$\ast$a, opal\+\_\+list\+\_\+item\+\_\+t $\ast$$\ast$b) \{ orte\+\_\+pls\+\_\+base\+\_\+cmp\+\_\+t $\ast$aa = $\ast$((orte\+\_\+pls\+\_\+base\+\_\+cmp\+\_\+t $\ast$$\ast$) a); orte\+\_\+pls\+\_\+base\+\_\+cmp\+\_\+t $\ast$bb = $\ast$((orte\+\_\+pls\+\_\+base\+\_\+cmp\+\_\+t $\ast$$\ast$) b);

if (bb-\/$>$priority $>$ aa-\/$>$priority) \{ return 1; \} else if (bb-\/$>$priority == aa-\/$>$priority) \{ return 0; \} else \{ return -\/1; \} \}  

\subsection{Function Documentation}
\hypertarget{opal__list_8h_a6592edc55b4211fafcdeb9dca534a215}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+begin@{opal\+\_\+list\+\_\+get\+\_\+begin}}
\index{opal\+\_\+list\+\_\+get\+\_\+begin@{opal\+\_\+list\+\_\+get\+\_\+begin}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+begin}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+get\+\_\+begin (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_a6592edc55b4211fafcdeb9dca534a215}


Return the beginning of the list; an invalid list entry suitable for comparison only. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the beginning of the list.
\end{DoxyReturn}
This is an O(1) operation to return the beginning of the list. Similar to the S\+T\+L, this is a special invalid list item -- it should {\itshape not} be used for storage. It is only suitable for comparison to other items in the list to see if they are valid or not; it's ususally used when iterating through the items in a list.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.



Referenced by mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), mca\+\_\+pml\+\_\+bfo\+\_\+send\+\_\+request\+\_\+restart(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_aa3fe31283c2203f82275bb9695002014}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+end@{opal\+\_\+list\+\_\+get\+\_\+end}}
\index{opal\+\_\+list\+\_\+get\+\_\+end@{opal\+\_\+list\+\_\+get\+\_\+end}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+end}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+get\+\_\+end (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_aa3fe31283c2203f82275bb9695002014}


Return the end of the list; an invalid list entry suitable for comparison only. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the end of the list.
\end{DoxyReturn}
This is an O(1) operation to return the end of the list. Similar to the S\+T\+L, this is a special invalid list item -- it should {\itshape not} be used for storage. It is only suitable for comparison to other items in the list to see if they are valid or not; it's ususally used when iterating through the items in a list.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.



Referenced by mca\+\_\+allocator\+\_\+basic\+\_\+alloc(), mca\+\_\+allocator\+\_\+basic\+\_\+free(), mca\+\_\+allocator\+\_\+component\+\_\+lookup(), mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+mpool\+\_\+base\+\_\+alloc(), mca\+\_\+oob\+\_\+base\+\_\+init(), mca\+\_\+oob\+\_\+base\+\_\+module\+\_\+init(), mca\+\_\+oob\+\_\+tcp\+\_\+fini(), mca\+\_\+oob\+\_\+tcp\+\_\+get\+\_\+addr(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+post(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+recv(), mca\+\_\+oob\+\_\+tcp\+\_\+recv\+\_\+cancel(), mca\+\_\+pml\+\_\+bfo\+\_\+is\+\_\+duplicate\+\_\+msg(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find\+\_\+all(), ompi\+\_\+proc\+\_\+all(), ompi\+\_\+proc\+\_\+complete\+\_\+init(), ompi\+\_\+proc\+\_\+finalize(), ompi\+\_\+proc\+\_\+find(), ompi\+\_\+proc\+\_\+refresh(), ompi\+\_\+proc\+\_\+world(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+ninsts(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+param(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+usage\+\_\+msg(), opal\+\_\+graph\+\_\+add\+\_\+edge(), opal\+\_\+graph\+\_\+add\+\_\+vertex(), opal\+\_\+graph\+\_\+adjacent(), opal\+\_\+graph\+\_\+dijkstra(), opal\+\_\+graph\+\_\+duplicate(), opal\+\_\+graph\+\_\+find\+\_\+vertex(), opal\+\_\+graph\+\_\+get\+\_\+adjacent\+\_\+vertices(), opal\+\_\+graph\+\_\+get\+\_\+graph\+\_\+vertices(), opal\+\_\+graph\+\_\+print(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint64(), opal\+\_\+list\+\_\+get\+\_\+size(), opal\+\_\+list\+\_\+join(), opal\+\_\+list\+\_\+remove\+\_\+item(), orte\+\_\+notifier\+\_\+base\+\_\+select(), orte\+\_\+odls\+\_\+base\+\_\+default\+\_\+signal\+\_\+local\+\_\+procs(), orte\+\_\+ras\+\_\+gridengine\+\_\+allocate(), orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes(), orte\+\_\+rml\+\_\+base\+\_\+select(), orte\+\_\+sensor\+\_\+base\+\_\+select(), and orte\+\_\+util\+\_\+add\+\_\+hostfile\+\_\+nodes().

\hypertarget{opal__list_8h_a260db4b3b9dffc1674298932c62b15e2}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+first@{opal\+\_\+list\+\_\+get\+\_\+first}}
\index{opal\+\_\+list\+\_\+get\+\_\+first@{opal\+\_\+list\+\_\+get\+\_\+first}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+first}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+get\+\_\+first (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_a260db4b3b9dffc1674298932c62b15e2}


Return the first item on the list (does not remove it). 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the first item on the list
\end{DoxyReturn}
This is an O(1) operation to return the first item on the list. It should be compared against the returned value from \hyperlink{opal__list_8h_aa3fe31283c2203f82275bb9695002014}{opal\+\_\+list\+\_\+get\+\_\+end()} to ensure that the list is not empty.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.



Referenced by mca\+\_\+allocator\+\_\+basic\+\_\+alloc(), mca\+\_\+allocator\+\_\+basic\+\_\+free(), mca\+\_\+allocator\+\_\+component\+\_\+lookup(), mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+btl\+\_\+elan\+\_\+component\+\_\+progress(), mca\+\_\+mpool\+\_\+base\+\_\+alloc(), mca\+\_\+oob\+\_\+base\+\_\+init(), mca\+\_\+oob\+\_\+base\+\_\+module\+\_\+init(), mca\+\_\+oob\+\_\+tcp\+\_\+fini(), mca\+\_\+oob\+\_\+tcp\+\_\+get\+\_\+addr(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+post(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+recv(), mca\+\_\+oob\+\_\+tcp\+\_\+recv\+\_\+cancel(), mca\+\_\+pml\+\_\+bfo\+\_\+is\+\_\+duplicate\+\_\+msg(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find\+\_\+all(), ompi\+\_\+proc\+\_\+all(), ompi\+\_\+proc\+\_\+complete\+\_\+init(), ompi\+\_\+proc\+\_\+finalize(), ompi\+\_\+proc\+\_\+find(), ompi\+\_\+proc\+\_\+refresh(), ompi\+\_\+proc\+\_\+world(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+ninsts(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+param(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+usage\+\_\+msg(), opal\+\_\+graph\+\_\+add\+\_\+edge(), opal\+\_\+graph\+\_\+add\+\_\+vertex(), opal\+\_\+graph\+\_\+adjacent(), opal\+\_\+graph\+\_\+dijkstra(), opal\+\_\+graph\+\_\+duplicate(), opal\+\_\+graph\+\_\+find\+\_\+vertex(), opal\+\_\+graph\+\_\+get\+\_\+adjacent\+\_\+vertices(), opal\+\_\+graph\+\_\+get\+\_\+graph\+\_\+vertices(), opal\+\_\+graph\+\_\+print(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint64(), opal\+\_\+list\+\_\+get\+\_\+size(), opal\+\_\+list\+\_\+join(), opal\+\_\+list\+\_\+remove\+\_\+item(), orte\+\_\+notifier\+\_\+base\+\_\+select(), orte\+\_\+odls\+\_\+base\+\_\+default\+\_\+signal\+\_\+local\+\_\+procs(), orte\+\_\+ras\+\_\+gridengine\+\_\+allocate(), orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes(), orte\+\_\+rml\+\_\+base\+\_\+select(), orte\+\_\+sensor\+\_\+base\+\_\+select(), and orte\+\_\+util\+\_\+add\+\_\+hostfile\+\_\+nodes().

\hypertarget{opal__list_8h_ac8de8a419e0cb2b14b227e047a1bd552}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+last@{opal\+\_\+list\+\_\+get\+\_\+last}}
\index{opal\+\_\+list\+\_\+get\+\_\+last@{opal\+\_\+list\+\_\+get\+\_\+last}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+last}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+get\+\_\+last (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_ac8de8a419e0cb2b14b227e047a1bd552}


Return the last item on the list (does not remove it). 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the last item on the list
\end{DoxyReturn}
This is an O(1) operation to return the last item on the list. It should be compared against the returned value from \hyperlink{opal__list_8h_a6592edc55b4211fafcdeb9dca534a215}{opal\+\_\+list\+\_\+get\+\_\+begin()} to ensure that the list is not empty.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.



Referenced by mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), mca\+\_\+pml\+\_\+bfo\+\_\+send\+\_\+request\+\_\+restart(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_aec770d8385a74a16b713bd0f8028e531}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+get\+\_\+size@{opal\+\_\+list\+\_\+get\+\_\+size}}
\index{opal\+\_\+list\+\_\+get\+\_\+size@{opal\+\_\+list\+\_\+get\+\_\+size}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+get\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}static size\+\_\+t opal\+\_\+list\+\_\+get\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_aec770d8385a74a16b713bd0f8028e531}


Return the number of items in a list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The size of the list (size\+\_\+t)
\end{DoxyReturn}
This is an O(1) lookup to return the size of the list.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation.

\begin{DoxyWarning}{Warning}
The size of the list is cached as part of the list. In the future, calling {\ttfamily opal\+\_\+list\+\_\+splice} or {\ttfamily opal\+\_\+list\+\_\+join} may result in this function recomputing the list size, which would be an O(\+N) operation. If {\ttfamily opal\+\_\+list\+\_\+splice} or {\ttfamily opal\+\_\+list\+\_\+join} is never called on the specified list, this function will always be O(1). 
\end{DoxyWarning}


References opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length.



Referenced by error\+\_\+out\+\_\+all\+\_\+pending\+\_\+frags(), mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+btl\+\_\+gm\+\_\+send(), mca\+\_\+btl\+\_\+sm\+\_\+component\+\_\+progress(), mca\+\_\+btl\+\_\+smcuda\+\_\+component\+\_\+progress(), mca\+\_\+mpool\+\_\+base\+\_\+alloc(), mca\+\_\+oob\+\_\+tcp\+\_\+get\+\_\+addr(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+complete(), mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+resolved(), mca\+\_\+pml\+\_\+bfo\+\_\+error\+\_\+pending\+\_\+packets(), mca\+\_\+pml\+\_\+bfo\+\_\+is\+\_\+duplicate\+\_\+msg(), mca\+\_\+pml\+\_\+bfo\+\_\+recv\+\_\+frag\+\_\+callback\+\_\+match(), mca\+\_\+pml\+\_\+bfo\+\_\+recv\+\_\+frag\+\_\+match(), mca\+\_\+pml\+\_\+csum\+\_\+recv\+\_\+frag\+\_\+callback\+\_\+match(), mca\+\_\+pml\+\_\+csum\+\_\+recv\+\_\+frag\+\_\+match(), mca\+\_\+pml\+\_\+ob1\+\_\+recv\+\_\+frag\+\_\+callback\+\_\+match(), mca\+\_\+pml\+\_\+ob1\+\_\+recv\+\_\+frag\+\_\+match(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+find\+\_\+all(), ompi\+\_\+proc\+\_\+all(), opal\+\_\+cmd\+\_\+line\+\_\+get\+\_\+usage\+\_\+msg(), opal\+\_\+graph\+\_\+get\+\_\+adjacent\+\_\+vertices(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+first\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+get\+\_\+next\+\_\+key\+\_\+uint64(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+all(), opal\+\_\+list\+\_\+join(), orte\+\_\+odls\+\_\+base\+\_\+open(), orte\+\_\+ras\+\_\+base\+\_\+node\+\_\+insert(), orte\+\_\+rmaps\+\_\+base\+\_\+filter\+\_\+nodes(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_a28470260a82c514b21d71a4acca23b62}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+insert@{opal\+\_\+list\+\_\+insert}}
\index{opal\+\_\+list\+\_\+insert@{opal\+\_\+list\+\_\+insert}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+insert}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C bool opal\+\_\+list\+\_\+insert (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{item, }
\item[{long long}]{idx}
\end{DoxyParamCaption}
)}}\label{opal__list_8h_a28470260a82c514b21d71a4acca23b62}


Add an item to the list at a specific index location in the list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container \\
\hline
{\em item} & The item to insert \\
\hline
{\em index} & Location to add the item\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if insertion succeeded; otherwise false
\end{DoxyReturn}
This is potentially an O(\+N) operation to traverse down to the correct location in the list and add an item.

Example\+: if idx = 2 and list = item1-\/$>$item2-\/$>$item3-\/$>$item4, then after insert, list = item1-\/$>$item2-\/$>$item-\/$>$item3-\/$>$item4.

If index is greater than the length of the list, no action is performed and false is returned. 

References opal\+\_\+atomic\+\_\+add, opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+prepend(), opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.

\hypertarget{opal__list_8h_a751bbd61726a33c214291a5feef1f5da}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+insert\+\_\+pos@{opal\+\_\+list\+\_\+insert\+\_\+pos}}
\index{opal\+\_\+list\+\_\+insert\+\_\+pos@{opal\+\_\+list\+\_\+insert\+\_\+pos}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+insert\+\_\+pos}]{\setlength{\rightskip}{0pt plus 5cm}static void opal\+\_\+list\+\_\+insert\+\_\+pos (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{pos, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{item}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_a751bbd61726a33c214291a5feef1f5da}


Add an item to the list before a given element. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container \\
\hline
{\em pos} & List element to insert {\ttfamily item} before \\
\hline
{\em item} & The item to insert\\
\hline
\end{DoxyParams}
Inserts {\ttfamily item} before {\ttfamily pos}. This is an O(1) operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+A\+D\+D32.



Referenced by mca\+\_\+allocator\+\_\+basic\+\_\+free(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_abe32e4699740692ecd282d0aff5e47fa}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+is\+\_\+empty@{opal\+\_\+list\+\_\+is\+\_\+empty}}
\index{opal\+\_\+list\+\_\+is\+\_\+empty@{opal\+\_\+list\+\_\+is\+\_\+empty}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+is\+\_\+empty}]{\setlength{\rightskip}{0pt plus 5cm}static bool opal\+\_\+list\+\_\+is\+\_\+empty (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_abe32e4699740692ecd282d0aff5e47fa}


Check for empty list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if list's size is 0, false otherwise
\end{DoxyReturn}
This is an O(1) operation.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel.



Referenced by mca\+\_\+base\+\_\+param\+\_\+dump(), mca\+\_\+btl\+\_\+elan\+\_\+component\+\_\+progress(), mca\+\_\+btl\+\_\+ud\+\_\+component\+\_\+progress(), mca\+\_\+mpool\+\_\+grdma\+\_\+register(), mca\+\_\+mpool\+\_\+rdma\+\_\+finalize(), mca\+\_\+mpool\+\_\+rdma\+\_\+register(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), opal\+\_\+graph\+\_\+remove\+\_\+vertex(), and orte\+\_\+ras\+\_\+gridengine\+\_\+allocate().

\hypertarget{opal__list_8h_acad40f223fd30c98c28b958df5b0f318}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+join@{opal\+\_\+list\+\_\+join}}
\index{opal\+\_\+list\+\_\+join@{opal\+\_\+list\+\_\+join}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+join}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void opal\+\_\+list\+\_\+join (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{thislist, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{pos, }
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{xlist}
\end{DoxyParamCaption}
)}}\label{opal__list_8h_acad40f223fd30c98c28b958df5b0f318}


Join a list into another list. 


\begin{DoxyParams}{Parameters}
{\em thislist} & List container for list being operated on \\
\hline
{\em pos} & List item in {\ttfamily thislist} marking the position before which items are inserted \\
\hline
{\em xlist} & List container for list being spliced from\\
\hline
\end{DoxyParams}
Join a list into another list. All of the elements of {\ttfamily xlist} are inserted before {\ttfamily pos} and removed from {\ttfamily xlist}.

This operation is an O(1) operation. Both {\ttfamily thislist} and {\ttfamily xlist} must be valid list containsers. {\ttfamily xlist} will be empty but valid after the call. All pointers to {\ttfamily \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t}} containers remain valid, including those that point to elements in {\ttfamily xlist}. 

References opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+size(), and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length.

\hypertarget{opal__list_8h_aa3769e688e697a51f4db6bba5de2f557}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+prepend@{opal\+\_\+list\+\_\+prepend}}
\index{opal\+\_\+list\+\_\+prepend@{opal\+\_\+list\+\_\+prepend}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+prepend}]{\setlength{\rightskip}{0pt plus 5cm}static void opal\+\_\+list\+\_\+prepend (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{item}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_aa3769e688e697a51f4db6bba5de2f557}


Prepend an item to the beginning of the list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container \\
\hline
{\em item} & The item to prepend\\
\hline
\end{DoxyParams}
This is an O(1) operation to prepend an item to the beginning of a list. The \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} is not \hyperlink{opal__object_8h_a67f8f5772cbe2caccc9b38fb435dfaf2}{O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N()}'ed; it is assumed that \char`\"{}ownership\char`\"{} of the item is passed from the caller to the list.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+A\+D\+D32.



Referenced by mca\+\_\+mpool\+\_\+rgpusm\+\_\+deregister(), mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), opal\+\_\+list\+\_\+insert(), and orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes().

\hypertarget{opal__list_8h_a85320676c6416a4c4a6c4219dad645ac}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+remove\+\_\+first@{opal\+\_\+list\+\_\+remove\+\_\+first}}
\index{opal\+\_\+list\+\_\+remove\+\_\+first@{opal\+\_\+list\+\_\+remove\+\_\+first}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+remove\+\_\+first}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+remove\+\_\+first (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_a85320676c6416a4c4a6c4219dad645ac}


Remove the first item from the list and return it. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The first item on the list. If the list is empty, N\+U\+L\+L will be returned
\end{DoxyReturn}
This is an O(1) operation to return the first item on the list. If the list is not empty, a pointer to the first item in the list will be returned. Ownership of the item is transferred from the list to the caller; no calls to \hyperlink{opal__object_8h_a67f8f5772cbe2caccc9b38fb435dfaf2}{O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N()} or \hyperlink{opal__object_8h_abc1e3a4a6f319e31f74659a2f073891a}{O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E()} are invoked.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+A\+D\+D32.



Referenced by error\+\_\+out\+\_\+all\+\_\+pending\+\_\+frags(), mca\+\_\+base\+\_\+param\+\_\+dump\+\_\+release(), mca\+\_\+base\+\_\+param\+\_\+finalize(), mca\+\_\+btl\+\_\+elan\+\_\+component\+\_\+progress(), mca\+\_\+btl\+\_\+gm\+\_\+send(), mca\+\_\+btl\+\_\+openib\+\_\+handle\+\_\+endpoint\+\_\+error(), mca\+\_\+btl\+\_\+sctp\+\_\+finalize(), mca\+\_\+btl\+\_\+tcp\+\_\+finalize(), mca\+\_\+btl\+\_\+ud\+\_\+component\+\_\+init(), mca\+\_\+btl\+\_\+ud\+\_\+component\+\_\+progress(), mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+select(), mca\+\_\+coll\+\_\+base\+\_\+find\+\_\+available(), mca\+\_\+io\+\_\+base\+\_\+delete(), mca\+\_\+io\+\_\+base\+\_\+file\+\_\+select(), mca\+\_\+io\+\_\+base\+\_\+find\+\_\+available(), mca\+\_\+oob\+\_\+tcp\+\_\+fini(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+complete(), mca\+\_\+oob\+\_\+tcp\+\_\+set\+\_\+addr(), mca\+\_\+pml\+\_\+bfo\+\_\+error\+\_\+pending\+\_\+packets(), ompi\+\_\+mpi\+\_\+finalize(), ompi\+\_\+op\+\_\+base\+\_\+find\+\_\+available(), ompi\+\_\+op\+\_\+base\+\_\+op\+\_\+select(), opal\+\_\+graph\+\_\+remove\+\_\+vertex(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+all(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+set\+\_\+value\+\_\+uint64(), opal\+\_\+list\+\_\+sort(), orte\+\_\+ess\+\_\+base\+\_\+close(), orte\+\_\+ras\+\_\+base\+\_\+node\+\_\+insert(), orte\+\_\+rmaps\+\_\+base\+\_\+close(), and orte\+\_\+util\+\_\+add\+\_\+hostfile\+\_\+nodes().

\hypertarget{opal__list_8h_ac12b27d060717880b8cfffffa2f85ecb}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+remove\+\_\+item@{opal\+\_\+list\+\_\+remove\+\_\+item}}
\index{opal\+\_\+list\+\_\+remove\+\_\+item@{opal\+\_\+list\+\_\+remove\+\_\+item}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+remove\+\_\+item}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+remove\+\_\+item (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{item}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_ac12b27d060717880b8cfffffa2f85ecb}


Remove an item from a list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container \\
\hline
{\em item} & The item to remove\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the item on the list previous to the one that was removed.
\end{DoxyReturn}
This is an O(1) operation to remove an item from the list. The forward / reverse pointers in the list are updated and the item is removed. The list item that is returned is now \char`\"{}owned\char`\"{} by the caller -- they are responsible for \hyperlink{opal__object_8h_abc1e3a4a6f319e31f74659a2f073891a}{O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E()}'ing it.

If debugging is enabled (specifically, if --enable-\/debug was used to configure Open M\+P\+I), this is an O(\+N) operation because it checks to see if the item is actually in the list first.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+A\+D\+D32.



Referenced by mca\+\_\+allocator\+\_\+basic\+\_\+alloc(), mca\+\_\+btl\+\_\+base\+\_\+select(), mca\+\_\+btl\+\_\+sctp\+\_\+del\+\_\+procs(), mca\+\_\+btl\+\_\+tcp\+\_\+del\+\_\+procs(), mca\+\_\+mpool\+\_\+grdma\+\_\+finalize(), mca\+\_\+mpool\+\_\+grdma\+\_\+find(), mca\+\_\+mpool\+\_\+grdma\+\_\+register(), mca\+\_\+mpool\+\_\+grdma\+\_\+release\+\_\+memory(), mca\+\_\+mpool\+\_\+rdma\+\_\+finalize(), mca\+\_\+mpool\+\_\+rdma\+\_\+find(), mca\+\_\+mpool\+\_\+rdma\+\_\+register(), mca\+\_\+mpool\+\_\+rdma\+\_\+release\+\_\+memory(), mca\+\_\+mpool\+\_\+rgpusm\+\_\+finalize(), mca\+\_\+mpool\+\_\+rgpusm\+\_\+find(), mca\+\_\+mpool\+\_\+rgpusm\+\_\+register(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+complete(), mca\+\_\+oob\+\_\+tcp\+\_\+msg\+\_\+match\+\_\+post(), mca\+\_\+oob\+\_\+tcp\+\_\+peer\+\_\+lookup(), mca\+\_\+oob\+\_\+tcp\+\_\+recv\+\_\+cancel(), mca\+\_\+pml\+\_\+bfo\+\_\+recv\+\_\+req\+\_\+start(), mca\+\_\+pml\+\_\+bfo\+\_\+send\+\_\+request\+\_\+restart(), mca\+\_\+pml\+\_\+csum\+\_\+recv\+\_\+req\+\_\+start(), mca\+\_\+pml\+\_\+ob1\+\_\+recv\+\_\+req\+\_\+start(), mca\+\_\+rcache\+\_\+vma\+\_\+tree\+\_\+delete(), opal\+\_\+graph\+\_\+remove\+\_\+edge(), opal\+\_\+graph\+\_\+remove\+\_\+vertex(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+ptr(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint32(), opal\+\_\+hash\+\_\+table\+\_\+remove\+\_\+value\+\_\+uint64(), orte\+\_\+rmaps\+\_\+base\+\_\+get\+\_\+target\+\_\+nodes(), orte\+\_\+rml\+\_\+base\+\_\+select(), and orte\+\_\+util\+\_\+add\+\_\+hostfile\+\_\+nodes().

\hypertarget{opal__list_8h_a650c882f43d59605ca8ada0728537f3a}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+remove\+\_\+last@{opal\+\_\+list\+\_\+remove\+\_\+last}}
\index{opal\+\_\+list\+\_\+remove\+\_\+last@{opal\+\_\+list\+\_\+remove\+\_\+last}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+remove\+\_\+last}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf opal\+\_\+list\+\_\+item\+\_\+t}$\ast$ opal\+\_\+list\+\_\+remove\+\_\+last (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{opal__list_8h_a650c882f43d59605ca8ada0728537f3a}


Remove the last item from the list and return it. 


\begin{DoxyParams}{Parameters}
{\em list} & The list container\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The last item on the list. If the list is empty, N\+U\+L\+L will be returned
\end{DoxyReturn}
This is an O(1) operation to return the last item on the list. If the list is not empty, a pointer to the last item in the list will be returned. Ownership of the item is transferred from the list to the caller; no calls to \hyperlink{opal__object_8h_a67f8f5772cbe2caccc9b38fb435dfaf2}{O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N()} or \hyperlink{opal__object_8h_abc1e3a4a6f319e31f74659a2f073891a}{O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E()} are invoked.

This is an inlined function in compilers that support inlining, so it's usually a cheap operation. 

References opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+next, opal\+\_\+list\+\_\+item\+\_\+t\+::opal\+\_\+list\+\_\+prev, opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+sentinel, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+A\+D\+D32.



Referenced by mca\+\_\+io\+\_\+base\+\_\+delete(), and mca\+\_\+io\+\_\+base\+\_\+file\+\_\+select().

\hypertarget{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+sort@{opal\+\_\+list\+\_\+sort}}
\index{opal\+\_\+list\+\_\+sort@{opal\+\_\+list\+\_\+sort}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+sort}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int opal\+\_\+list\+\_\+sort (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{list, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t}}]{compare}
\end{DoxyParamCaption}
)}}\label{opal__list_8h_a689587cc0ac6fd82742103dd7c4d84ce}


Sort a list with a provided compare function. 


\begin{DoxyParams}{Parameters}
{\em list} & The list to sort \\
\hline
{\em compare} & Compare function\\
\hline
\end{DoxyParams}
Put crassly, this function's complexity is O(\+N) + O(log(\+N)). Its algorithm is\+:


\begin{DoxyItemize}
\item remove every item from the list and put the corresponding (opal\+\_\+list\+\_\+item\+\_\+t$\ast$)'s in an array
\item call qsort(3) with that array and your compare function
\item re-\/add every element of the now-\/sorted array to the list
\end{DoxyItemize}

The resulting list is now ordered. Note, however, that since an array of pointers is sorted, the comparison function must do a double de-\/reference to get to the actual \hyperlink{structopal__list__item__t}{opal\+\_\+list\+\_\+item\+\_\+t} (or whatever the underlying type is). See the documentation of opal\+\_\+list\+\_\+item\+\_\+compare\+\_\+fn\+\_\+t for an example). 

References opal\+\_\+list\+\_\+append, opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length, and opal\+\_\+list\+\_\+remove\+\_\+first().

\hypertarget{opal__list_8h_a74a1d8cf6d75ee3ffd16b5ef8eb1facb}{\index{opal\+\_\+list.\+h@{opal\+\_\+list.\+h}!opal\+\_\+list\+\_\+splice@{opal\+\_\+list\+\_\+splice}}
\index{opal\+\_\+list\+\_\+splice@{opal\+\_\+list\+\_\+splice}!opal\+\_\+list.\+h@{opal\+\_\+list.\+h}}
\subsubsection[{opal\+\_\+list\+\_\+splice}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+A\+L\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void opal\+\_\+list\+\_\+splice (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{thislist, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{pos, }
\item[{{\bf opal\+\_\+list\+\_\+t} $\ast$}]{xlist, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{first, }
\item[{{\bf opal\+\_\+list\+\_\+item\+\_\+t} $\ast$}]{last}
\end{DoxyParamCaption}
)}}\label{opal__list_8h_a74a1d8cf6d75ee3ffd16b5ef8eb1facb}


Splice a list into another list. 


\begin{DoxyParams}{Parameters}
{\em thislist} & List container for list being operated on \\
\hline
{\em pos} & List item in {\ttfamily thislist} marking the position before which items are inserted \\
\hline
{\em xlist} & List container for list being spliced from \\
\hline
{\em first} & List item in {\ttfamily xlist} marking the start of elements to be copied into {\ttfamily thislist} \\
\hline
{\em last} & List item in {\ttfamily xlist} marking the end of elements to be copied into {\ttfamily thislist} \\
\hline
\end{DoxyParams}
Splice a subset of a list into another list. The {\ttfamily }\mbox{[}first, last) elements of {\ttfamily xlist} are moved into {\ttfamily thislist}, inserting them before {\ttfamily pos}. {\ttfamily pos} must be a valid iterator in {\ttfamily thislist} and {\ttfamily }\mbox{[}first, last) must be a valid range in {\ttfamily xlist}. {\ttfamily postition} must not be in the range {\ttfamily }\mbox{[}first, last). It is, however, valid for {\ttfamily xlist} and {\ttfamily thislist} to be the same list.

This is an O(\+N) operation because the length of both lists must be recomputed. 

References opal\+\_\+list\+\_\+get\+\_\+next, and opal\+\_\+list\+\_\+t\+::opal\+\_\+list\+\_\+length.

