rciCpu(3)

NAME
rciCpu -- CPU number of the current RCI task.

USAGE
extern int rciCpu;

DESCRIPTION
This variable contains the number of the CPU on which code is currently running. It is set by the RCI monitor when the CPU is first loaded. CPU number 0 is the arbiter CPU.

This variable is particularly useful for doing code initializations that are CPU dependent. For instance, constructions like the following are used in several places within RCI and RCCL:
        static int perCpuInitDone;

        if (perCpuInitDome != rciCpu)
         { ... do initializations specific to this CPU ...
         }

SEE ALSO
rciCreate(3).