\hypertarget{MTX_8ih}{
\section{MTX.ih File Reference}
\label{MTX_8ih}\index{MTX.ih@{MTX.ih}}
}
Simple mutex, inline interface and implementation.  


{\tt \#include $<$PBI/Inline.h$>$}\par
{\tt \#include $<$PBI/Attribute.h$>$}\par
{\tt \#include $<$PBS/MTX.h$>$}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{MTX_8ih_409100967da28ee4482f3a4c0703d546}{
\#define \hyperlink{MTX_8ih_409100967da28ee4482f3a4c0703d546}{MTX\_\-\_\-EXP\_\-PROTO}~INLINE\_\-USR\_\-EXP\_\-PROTO}
\label{MTX_8ih_409100967da28ee4482f3a4c0703d546}

\begin{CompactList}\small\item\em Export Prototype spec. \item\end{CompactList}\item 
\hypertarget{MTX_8ih_b6053c92d85632057afd2d2a1cd9d4d6}{
\#define \hyperlink{MTX_8ih_b6053c92d85632057afd2d2a1cd9d4d6}{MTX\_\-\_\-LCL\_\-PROTO}~INLINE\_\-USR\_\-LCL\_\-PROTO}
\label{MTX_8ih_b6053c92d85632057afd2d2a1cd9d4d6}

\begin{CompactList}\small\item\em Internal Prototype spec. \item\end{CompactList}\item 
\hypertarget{MTX_8ih_f90a64add10f4ecf4bc3a5b56892081d}{
\#define \hyperlink{MTX_8ih_f90a64add10f4ecf4bc3a5b56892081d}{MTX\_\-\_\-EXP\_\-FNC}~INLINE\_\-USR\_\-EXP\_\-FNC}
\label{MTX_8ih_f90a64add10f4ecf4bc3a5b56892081d}

\begin{CompactList}\small\item\em Export Function declaration. \item\end{CompactList}\item 
\hypertarget{MTX_8ih_32f8f4f11355aec55cacd6e01d843fb7}{
\#define \hyperlink{MTX_8ih_32f8f4f11355aec55cacd6e01d843fb7}{MTX\_\-\_\-LCL\_\-FNC}~INLINE\_\-USR\_\-LCL\_\-FNC}
\label{MTX_8ih_32f8f4f11355aec55cacd6e01d843fb7}

\begin{CompactList}\small\item\em Internal Function declaration. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
MTX\_\-\_\-EXP\_\-PROTO \hyperlink{MTX_8h_8vx-xxx-xxx_8ff55bbc376fe4c5d025850d7b4fc28a}{MTX} \hyperlink{MTX_8ih_0e80d5a8f1f5a987a96d68aaeb1b9c93}{MTX\_\-\_\-create} (unsigned int options) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Creates a mutex. \item\end{CompactList}\item 
MTX\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{MTX_8ih_59fc082169b21600f97975c6ff193b66}{MTX\_\-\_\-lock} (\hyperlink{MTX_8h_8vx-xxx-xxx_8ff55bbc376fe4c5d025850d7b4fc28a}{MTX} mutex) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Locks the mutex. This call may block until the mutex can be locked. \item\end{CompactList}\item 
MTX\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{MTX_8ih_ca633c56b8d98c7f57f5e6685cecda1c}{MTX\_\-\_\-unlock} (\hyperlink{MTX_8h_8vx-xxx-xxx_8ff55bbc376fe4c5d025850d7b4fc28a}{MTX} mutex) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Unlocks the mutex. \item\end{CompactList}\item 
MTX\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{MTX_8ih_cf4c0273cb7a681951ba70b8ddec5102}{MTX\_\-\_\-destroy} (\hyperlink{MTX_8h_8vx-xxx-xxx_8ff55bbc376fe4c5d025850d7b4fc28a}{MTX} mutex) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Destroys the mutex. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Simple mutex, inline interface and implementation. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}

    CVS $Id: MTX.ih,v 1.4 2011/03/24 23:05:42 apw Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{MTX_8ih_0e80d5a8f1f5a987a96d68aaeb1b9c93}{
\index{MTX.ih@{MTX.ih}!MTX\_\-\_\-create@{MTX\_\-\_\-create}}
\index{MTX\_\-\_\-create@{MTX\_\-\_\-create}!MTX.ih@{MTX.ih}}
\subsubsection[{MTX\_\-\_\-create}]{\setlength{\rightskip}{0pt plus 5cm}MTX\_\-\_\-EXP\_\-PROTO {\bf MTX} MTX\_\-\_\-create (unsigned int {\em options})}}
\label{MTX_8ih_0e80d5a8f1f5a987a96d68aaeb1b9c93}


Creates a mutex. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em options}]A bit mask of options formed from the enumeration MTX\_\-OPTIONS\_\-M \end{description}
\end{Desc}


Referenced by TAU\_\-initialize().\hypertarget{MTX_8ih_cf4c0273cb7a681951ba70b8ddec5102}{
\index{MTX.ih@{MTX.ih}!MTX\_\-\_\-destroy@{MTX\_\-\_\-destroy}}
\index{MTX\_\-\_\-destroy@{MTX\_\-\_\-destroy}!MTX.ih@{MTX.ih}}
\subsubsection[{MTX\_\-\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}MTX\_\-\_\-EXP\_\-PROTO unsigned int MTX\_\-\_\-destroy ({\bf MTX} {\em mutex})}}
\label{MTX_8ih_cf4c0273cb7a681951ba70b8ddec5102}


Destroys the mutex. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mutex}]The mutex to destroy \end{description}
\end{Desc}


Referenced by TAU\_\-shutdown().\hypertarget{MTX_8ih_59fc082169b21600f97975c6ff193b66}{
\index{MTX.ih@{MTX.ih}!MTX\_\-\_\-lock@{MTX\_\-\_\-lock}}
\index{MTX\_\-\_\-lock@{MTX\_\-\_\-lock}!MTX.ih@{MTX.ih}}
\subsubsection[{MTX\_\-\_\-lock}]{\setlength{\rightskip}{0pt plus 5cm}MTX\_\-\_\-EXP\_\-PROTO unsigned int MTX\_\-\_\-lock ({\bf MTX} {\em mutex})}}
\label{MTX_8ih_59fc082169b21600f97975c6ff193b66}


Locks the mutex. This call may block until the mutex can be locked. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mutex}]The mutex to lock \end{description}
\end{Desc}


Referenced by TAU\_\-pread().\hypertarget{MTX_8ih_ca633c56b8d98c7f57f5e6685cecda1c}{
\index{MTX.ih@{MTX.ih}!MTX\_\-\_\-unlock@{MTX\_\-\_\-unlock}}
\index{MTX\_\-\_\-unlock@{MTX\_\-\_\-unlock}!MTX.ih@{MTX.ih}}
\subsubsection[{MTX\_\-\_\-unlock}]{\setlength{\rightskip}{0pt plus 5cm}MTX\_\-\_\-EXP\_\-PROTO unsigned int MTX\_\-\_\-unlock ({\bf MTX} {\em mutex})}}
\label{MTX_8ih_ca633c56b8d98c7f57f5e6685cecda1c}


Unlocks the mutex. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mutex}]The mutex to lock \end{description}
\end{Desc}


Referenced by TAU\_\-pread().