rciStart(3)

NAME
rciStart, rciRelease
 -- start and stop RCI tasks.

USAGE
#include <rci.h>

rciStart(taskMask)
   unsigned long taskMask;

rciRelease(taskMask)
   unsigned long taskMask;

ARGUMENTS

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., (unsigned long)~0).

RESTRICTIONS
These routines must be called from the planning level.

DESCRIPTION
rciStart() starts the indicated tasks, first calling each task's startup function, and then notifying the task's monitor to begin watching for the task to become runnable. The task is henceforth active.

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 release function with the code RELEASE_REQ. The task is henceforth idle.

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

The following codes pertain only to rciStart():

EDescriptor --
    Invalid task descriptor.

ENoSpecify --
    Either no scheduling discipline has been specified, or no rate has been specified for the ON_CLOCK or ON_TRIGGER disciplines.

The following code may be returned by both functions:

EInternal --
    Unexpected internal software error or loss of communication between processors.

These routines will abort the program if called from the control level.

SEE ALSO
rciCreate(3), rciControlFxns(3), rciAllocDevice(3), rciInterruptDev(3), rciScheduling(3), rciRate(3), errorStack(3).