\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{rciStart}{3}
\manSection{NAME}
{\tt \manName{rciStart}}, 
{\tt \manName{rciRelease}}
 -- start and stop RCI tasks.
\manSection{USAGE}
\cverbatim
#include <rci.h>

rciStart(taskMask)
   unsigned long taskMask;
   
rciRelease(taskMask)
   unsigned long taskMask; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt taskMask} --}
A bitmask describing the tasks to be started or released. Bit 0 always
denotes the planning task, and so is not relevant to these routines.
Bit settings for nonexistent tasks, the planning task, or tasks
which are already started (or stopped) are ignored. This allows the
user to specify ``all relevant tasks'' by simply specifying a mask with
all bits set (i.e., {\tt (unsigned long)\~0}).
\manSection{RESTRICTIONS}
These routines must be called from the planning level.
\manSection{DESCRIPTION}
{\tt rciStart()} starts the indicated tasks, first calling each task's
{\it startup} function, and then notifying the task's
monitor to begin watching for the task to become runnable. 
The task is henceforth {\it active}.

{\tt rciRelease()} shuts down the indicated tasks. This is done by
advising the task monitor that the task should be released. The monitor
will then call the task's {\it release} function with the code
{\tt RELEASE_REQ}. 
The task is henceforth {\it idle}.

\manSection{DIAGNOSTICS}
All functions return {\tt -1} when an error occurs.
Error information is reported on the {\it errorStack} (q.v.).
Error codes can be obtained with {\tt getErrorCode()}.

The following codes pertain only to {\tt rciStart()}:

\manItem{{\tt EDescriptor} --}
Invalid task descriptor.
\manItem{{\tt ENoSpecify} --}
Either no scheduling discipline has been specified, or
no rate has been specified for the {\tt ON_CLOCK} or {\tt ON_TRIGGER} 
disciplines.

The following code may be returned by both functions:

\manItem{{\tt EInternal} --}
Unexpected internal software error or loss of communication between
processors.

These routines will abort the program if called from the control level.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt rciCreate(3)}, {\tt rciControlFxns(3)},
{\tt rciAllocDevice(3)}, {\tt rciInterruptDev(3)},
{\tt rciScheduling(3)}, {\tt rciRate(3)}, {\tt errorStack(3)}.
\manEnd
\end
