rciSignal(3)

NAME
rciSignal, rciTime, rciBadAddr
 -- RCI support routines.

USAGE
rciSignal(signum)
   int signum;

rciTime()

float rciTimeInterval()

rciBadAddr(address, size)
   void *address;
   int size;

ARGUMENTS

signum --
    UNIX signal number.

address --
    Pointer to the memory location to be tested.

size --
    Size of the memory location to be tested, in bytes.

DESCRIPTION
These routines may be called from any part of an RCI program.

rciSignal() causes the indicated UNIX signal to be delivered to the planning task. Note that SIGHUP and SIGXCPU are normally reserved by RCI and will cause program aborts if used.

rciTime() returns the current system time in milliseconds. Note that the time resolution of the system might not be as low as 1 millisecond. The same clock is used for all RCI control tasks, regardless of CPU. The CPU which provides this clock may be dynamically relocated, however, depending on which CPUs are available to run the clock. If the first RCI task is created on the arbiter CPU, then the clock will initially be operated there. As soon as a task is created on an auxiliary CPU, the clock will be relocated to that CPU. The value returned by rciTime() is undefined prior to the first call to rciCreate(), at which point a CPU is selected to act as clock server.

rciTimeInterval() returns the granularity of the RCI system clock, in milliseconds. The value returned by this call is undefined prior to the first call to rciCreate().

rciBadAddr() behaves exactly like the UNIX kernel routine badaddr and functions in the same way: it takes a pointer to a memory location (that assumably maps onto some region of an external bus) and returns 1 if no memory is detected there, and 0 otherwise. The size of the memory region to be tested is restricted to 1, 2, or 4 bytes. This routine is mainly used by the probe() routine of device drivers (see IOdevice(7)).

DIAGNOSTICS
rciSignal() returns -1 if signum is not a valid UNIX signal.

rciBadAddr() returns -1 if the specified size is incorrect or the function is called from the planning task.