rciAllocCpus(3)

NAME
rciAllocCpus -- allocate CPUs for RCI system.

USAGE
unsigned long rciAllocCpus (cpuMask)
  unsigned long cpuMask;

ARGUMENTS

cpuMask --
    Mask describing the CPUs which should be allocated.

RESTRICTIONS
This routine must be called from the planning level.

DESCRIPTION
This routine allows an RCI program to allocate system CPUs for later use by the program (i.e., for use in subsequent calls to rciCreate()). The routine returns a bitmask describing which CPUs were actually allocated.

This routine has a few uses. It gives the programmer the ability to test for the availability of system CPUs without actually creating tasks on them. In addition, it may be useful to allocate an auxiliary CPU to make sure that one is available to serve as the system clock; the system clock is set up during the first call to rciCreate(), and the CPU chosen to act as clock server is selected from among the CPUs allocated at that time.

DIAGNOSTICS
The routine returns -1 in the event of an error. Error information is reported on the errorStack (q.v.). Returned error codes are accessible with getErrorCode().

Possible error codes include:

EInternal --
    Unexpected internal software failure.

EBadAccess --
    Unexpected error trying to open CPU device driver.

The routine will abort the program if called from the control level.

SEE ALSO
rciCreate(), rciStart().