\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{rciSignal}{3}
\manSection{NAME}
{\tt \manName{rciSignal}}, 
{\tt \manName{rciTime}}, 
{\tt \manName{rciBadAddr}}
 -- RCI support routines.
\manSection{USAGE}
\cverbatim
rciSignal(signum)
   int signum;

rciTime()

float rciTimeInterval()

rciBadAddr(address, size)
   void *address;
   int size; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt signum} --}
UNIX signal number.
\manItem{{\tt address} --}
Pointer to the memory location to be tested.
\manItem{{\tt size} --}
Size of the memory location to be tested, in bytes. 
\manSection{DESCRIPTION}
These routines may be called from any part of an RCI program.

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

{\tt 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 {\tt rciTime()} is undefined prior to the first
call to {\tt rciCreate()}, at which point a CPU is selected to act as
clock server.

{\tt 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 {\tt rciCreate()}.

{\tt rciBadAddr()} behaves exactly like the UNIX kernel routine {\tt 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 {\tt 1} if no
memory is detected there, and {\tt 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 {\tt probe()} routine of device drivers (see
{\tt IOdevice(7)}).
\manSection{DIAGNOSTICS}
{\tt rciSignal()} returns {\tt -1} if {\tt signum} is not
a valid UNIX signal.

{\tt rciBadAddr()} returns {\tt -1} if the specified size is incorrect or
the function is called from the planning task.
\manEnd
\end
