\rhead{\bf mc\_SemaphorePost()}
\noindent
\vspace{5pt}
\rule{6.5in}{0.015in}
\noindent
\phantomsection
{\LARGE \bf mc\_SemaphorePost()\index{mc\_SemaphorePost()}}\\
\addcontentsline{toc}{section}{mc\_SemaphorePost()}

\noindent
{\bf Synopsis}\\
%{\bf \#include $<$mobilec.h$>$}\\
{\bf int mc\_SemaphorePost}({\bf int} $id$);\\

\noindent
{\bf Purpose}\\
This function unlocks one resource from a Mobile-C semaphore, increasing its
count by one.\\

\noindent
{\bf Return Value}\\
This function returns 0 on success, or non-zero if the id could not be found 
or on a semaphore error. \\

\noindent
{\bf Parameters}
\vspace{-0.1pt}
\begin{description}
\item
\begin{tabular}{p{10 mm}p{145 mm}} 
$id$ & The id of the synchronization variable to lock. 
\end{tabular}
\end{description}

\noindent
{\bf Description}\\
{\bf mc\_SemaphorePost} unlocks a resource from a previously allocated and 
initialized Mobile-C synchronization variable being used as a semaphore. 
This function may be called multiple times to increase the count of the 
semaphore up to INT\_MAX. 
Note that although a Mobile-C synchronization variable may be used as a mutex, 
condition variable, or semaphore, once it is used as a semaphore, it should 
only be used as a semaphore for the remainder of its life cycle.\\

\noindent
{\bf Example}\\
The MC\_SemaphorePost() function usage is very similar to the other
binary space synchronization functions. Please see Chapter 
\ref{chap:synchronization} on page \pageref{chap:synchronization} 
and the demo at ``demos/agent\_semaphore\_example/'' for
more information.\\
\noindent

\noindent
{\bf See Also}\\
mc\_SemaphoreWait(), mc\_SyncInit(), mc\_SyncDelete().\\

%\CPlot::\DataThreeD(), \CPlot::\DataFile(), \CPlot::\Plotting(), \plotxy().\\
