\hypertarget{SEM_8h}{
\section{SEM.h File Reference}
\label{SEM_8h}\index{SEM.h@{SEM.h}}
}
Simple semaphore, interface definition.  


\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{SEM_8h_8px-xxx-xxx_57c0945c6e1df9e526063d39e7d342c4}{SEM} \hyperlink{SEM_8h_325b4354db27189b02e1bc80ee08e458}{SEM\_\-create} (unsigned int options)
\begin{CompactList}\small\item\em Creates a semaphore. \item\end{CompactList}\item 
unsigned int \hyperlink{SEM_8h_ada8db5a63bb5bec76fa0cf11dc828a4}{SEM\_\-takeW} (\hyperlink{SEM_8h_8px-xxx-xxx_57c0945c6e1df9e526063d39e7d342c4}{SEM} semaphore)
\begin{CompactList}\small\item\em Takes the semaphore. This call will block until the semaphore can be taken. \item\end{CompactList}\item 
unsigned int \hyperlink{SEM_8h_12107fe5b36209c95980e78ea18af3d1}{SEM\_\-give} (\hyperlink{SEM_8h_8px-xxx-xxx_57c0945c6e1df9e526063d39e7d342c4}{SEM} semaphore)
\begin{CompactList}\small\item\em Gives the semaphore. \item\end{CompactList}\item 
unsigned int \hyperlink{SEM_8h_947d6fcaca42d99958624326bc585445}{SEM\_\-destroy} (\hyperlink{SEM_8h_8px-xxx-xxx_57c0945c6e1df9e526063d39e7d342c4}{SEM} semaphore)
\begin{CompactList}\small\item\em Destroys the semaphore. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Simple semaphore, interface definition. 

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


\footnotesize\begin{verbatim}

    CVS $Id: SEM.h,v 1.3 2011/03/24 23:05:44 apw Exp $
\end{verbatim}
\normalsize
 

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


Creates a semaphore. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em NON-NULL}]A pointer to the created semaphore \item[{\em NULL}]Error in the creation\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em options}]A bit mask of options formed from the enumeration SEM\_\-OPTIONS\_\-M \end{description}
\end{Desc}
\hypertarget{SEM_8h_947d6fcaca42d99958624326bc585445}{
\index{SEM.h@{SEM.h}!SEM\_\-destroy@{SEM\_\-destroy}}
\index{SEM\_\-destroy@{SEM\_\-destroy}!SEM.h@{SEM.h}}
\subsubsection[{SEM\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int SEM\_\-destroy ({\bf SEM} {\em semaphore})}}
\label{SEM_8h_947d6fcaca42d99958624326bc585445}


Destroys the semaphore. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em semaphore}]The semaphore to destroy \end{description}
\end{Desc}
\hypertarget{SEM_8h_12107fe5b36209c95980e78ea18af3d1}{
\index{SEM.h@{SEM.h}!SEM\_\-give@{SEM\_\-give}}
\index{SEM\_\-give@{SEM\_\-give}!SEM.h@{SEM.h}}
\subsubsection[{SEM\_\-give}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int SEM\_\-give ({\bf SEM} {\em semaphore})}}
\label{SEM_8h_12107fe5b36209c95980e78ea18af3d1}


Gives the semaphore. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em semaphore}]The semaphore to give \end{description}
\end{Desc}
\hypertarget{SEM_8h_ada8db5a63bb5bec76fa0cf11dc828a4}{
\index{SEM.h@{SEM.h}!SEM\_\-takeW@{SEM\_\-takeW}}
\index{SEM\_\-takeW@{SEM\_\-takeW}!SEM.h@{SEM.h}}
\subsubsection[{SEM\_\-takeW}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int SEM\_\-takeW ({\bf SEM} {\em semaphore})}}
\label{SEM_8h_ada8db5a63bb5bec76fa0cf11dc828a4}


Takes the semaphore. This call will block until the semaphore can be taken. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em semaphore}]The semaphore to take \end{description}
\end{Desc}
