%-*-mode:latex-*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (C) 1996-2004 Jason Evans <jasone@canonware.com>.
% All rights reserved.
% 
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
% 1. Redistributions of source code must retain the above copyright
%    notice(s), this list of conditions and the following disclaimer
%    unmodified other than the allowable addition of one or more
%    copyright notices.
% 2. Redistributions in binary form must reproduce the above copyright
%    notice(s), this list of conditions and the following disclaimer in
%    the documentation and/or other materials provided with the
%    distribution.
% 
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
% EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
% PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
% BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
% WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
% OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
% EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Version: Onyx 5.1.1
%
% nxo_condition portion of Onyx Manual.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{nxo\_condition}
\label{nxo_condition}
\index{nxo_condition@\classname{nxo\_condition}{}}

The \classname{nxo\_condition} class is a subclass of the \classname{nxo} class.

\subsubsection{API}
\begin{capi}
\label{nxo_condition_new}
\index{nxo_condition_new@\cfunc{nxo\_condition\_new}{}}
\citem{\cfunc[void]{nxo\_condition\_new}{cw\_nxo\_t *a\_nxo}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to a condition \classname{nxo}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ]
		\begin{description}\item[]
		\item[\htmlref{CW\_ONYXX\_OOM}{CW_ONYXX_OOM}.]
		\end{description}
	\item[Description: ]
		Constructor.
	\end{capilist}
\label{nxo_condition_signal}
\index{nxo_condition_signal@\cfunc{nxo\_condition\_signal}{}}
\citem{\cfunc[void]{nxo\_condition\_signal}{cw\_nxo\_t *a\_nxo}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to a condition \classname{nxo}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ] None.
	\item[Description: ]
		Signal one thread waiting on \cvar{a\_nxo}, if there are any
		waiters.
	\end{capilist}
\label{nxo_condition_broadcast}
\index{nxo_condition_broadcast@\cfunc{nxo\_condition\_broadcast}{}}
\citem{\cfunc[void]{nxo\_condition\_broadcast}{cw\_nxo\_t *a\_nxo}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to a condition \classname{nxo}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ] None.
	\item[Description: ]
		Signal all threads waiting on \cvar{a\_nxo}.
	\end{capilist}
\label{nxo_condition_wait}
\index{nxo_condition_wait@\cfunc{nxo\_condition\_wait}{}}
\citem{\cfunc[void]{nxo\_condition\_wait}{cw\_nxo\_t *a\_nxo, cw\_nxo\_t
*a\_mutex}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to a condition \classname{nxo}.
		\item[a\_mutex: ]
			Pointer to a mutex \classname{nxo}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ] None.
	\item[Description: ]
		Wait for \cvar{a\_nxo}.
	\end{capilist}
\label{nxo_condition_timedwait}
\index{nxo_condition_timedwait@\cfunc{nxo\_condition\_timedwait}{}}
\citem{\cfunc[bool]{nxo\_condition\_timedwait}{cw\_nxo\_t *a\_nxo,
cw\_nxo\_t *a\_mutex, const struct timespec *a\_timeout}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to a condition \classname{nxo}.
		\item[a\_mutex: ]
			Pointer to a mutex \classname{nxo}.
		\item[a\_timeout: ]
			Timeout, specified as an absolute time interval.
		\end{description}
	\item[Output(s): ]
		\begin{description}\item[]
		\item[retval: ]
			\begin{description}\item[]
			\item[false: ] Success.
			\item[true: ] Timeout.
			\end{description}
		\end{description}
	\item[Exception(s): ] None.
	\item[Description: ]
		Wait for \cvar{a\_nxo} for at least \cvar{a\_timeout}.
	\end{capilist}
\end{capi}
