\hypertarget{SEM_8ih}{
\section{SEM.ih File Reference}
\label{SEM_8ih}\index{SEM.ih@{SEM.ih}}
}
Simple semaphore, inline interface and implementation.  


{\tt \#include \char`\"{}PBI/Inline.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Attribute.h\char`\"{}}\par
{\tt \#include \char`\"{}PBS/SEM.h\char`\"{}}\par


Include dependency graph for SEM.ih:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=145pt]{SEM_8ih__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{SEM_8ih_a0}{
\#define \hyperlink{SEM_8ih_a0}{SEM\_\-\_\-EXP\_\-PROTO}\ INLINE\_\-USR\_\-EXP\_\-PROTO}
\label{SEM_8ih_a0}

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

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

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

\begin{CompactList}\small\item\em Internal Function declaration. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
SEM\_\-\_\-EXP\_\-PROTO \hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} \hyperlink{SEM_8ih_a4}{SEM\_\-\_\-create} (unsigned int options) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Creates a semaphore. \item\end{CompactList}\item 
SEM\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{SEM_8ih_a5}{SEM\_\-\_\-take\-W} (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} semaphore) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Takes the semaphore. This call will block until the semaphore can be acquired. \item\end{CompactList}\item 
SEM\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{SEM_8ih_a6}{SEM\_\-\_\-give} (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} give) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Gives the semaphore. \item\end{CompactList}\item 
SEM\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{SEM_8ih_a7}{SEM\_\-\_\-destroy} (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} semaphore) ATTR\_\-UNUSED\_\-OK
\begin{CompactList}\small\item\em Destroys the semaphore. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Simple semaphore, 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: SEM.ih,v 1.3 2005/10/01 01:00:12 russell Exp $
\end{verbatim}\normalsize


\subsection{Function Documentation}
\hypertarget{SEM_8ih_a4}{
\index{SEM.ih@{SEM.ih}!SEM__create@{SEM\_\-\_\-create}}
\index{SEM__create@{SEM\_\-\_\-create}!SEM.ih@{SEM.ih}}
\subsubsection[SEM\_\-\_\-create]{\setlength{\rightskip}{0pt plus 5cm}SEM\_\-\_\-EXP\_\-PROTO \hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} SEM\_\-\_\-create (unsigned int {\em options})}}
\label{SEM_8ih_a4}


Creates a semaphore. 

\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 SEM\_\-OPTIONS\_\-M \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=117pt]{SEM_8ih_a4_cgraph}
\end{center}
\end{figure}
\hypertarget{SEM_8ih_a7}{
\index{SEM.ih@{SEM.ih}!SEM__destroy@{SEM\_\-\_\-destroy}}
\index{SEM__destroy@{SEM\_\-\_\-destroy}!SEM.ih@{SEM.ih}}
\subsubsection[SEM\_\-\_\-destroy]{\setlength{\rightskip}{0pt plus 5cm}SEM\_\-\_\-EXP\_\-PROTO unsigned int SEM\_\-\_\-destroy (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} {\em semaphore})}}
\label{SEM_8ih_a7}


Destroys the semaphore. 

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


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=119pt]{SEM_8ih_a7_cgraph}
\end{center}
\end{figure}
\hypertarget{SEM_8ih_a6}{
\index{SEM.ih@{SEM.ih}!SEM__give@{SEM\_\-\_\-give}}
\index{SEM__give@{SEM\_\-\_\-give}!SEM.ih@{SEM.ih}}
\subsubsection[SEM\_\-\_\-give]{\setlength{\rightskip}{0pt plus 5cm}SEM\_\-\_\-EXP\_\-PROTO unsigned int SEM\_\-\_\-give (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} {\em semaphore})}}
\label{SEM_8ih_a6}


Gives the semaphore. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em semaphore}]The semaphore to give \end{description}
\end{Desc}
\hypertarget{SEM_8ih_a5}{
\index{SEM.ih@{SEM.ih}!SEM__takeW@{SEM\_\-\_\-takeW}}
\index{SEM__takeW@{SEM\_\-\_\-takeW}!SEM.ih@{SEM.ih}}
\subsubsection[SEM\_\-\_\-takeW]{\setlength{\rightskip}{0pt plus 5cm}SEM\_\-\_\-EXP\_\-PROTO unsigned int SEM\_\-\_\-take\-W (\hyperlink{SEM_8h_8px-xxx-xxx_a0}{SEM} {\em semaphore})}}
\label{SEM_8ih_a5}


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

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