rciOnInterrupt(3)

NAME
rciOnInterrupt, rciTimeReady -- wakeup functions for RCI tasks.

USAGE
#include <rci.h>

rciOnInterrupt(td)
  RCI_DESC *td;

rciTimeReady(td)
  RCI_DESC *td;

ARGUMENTS

td --
    Pointer to task descriptor.

DESCRIPTION
These are supplied wakeup functions which may be specified for RCI control tasks that are scheduled using the ON_FUNCTION, ON_TRIGGER, or ON_SIGNAL scheduling disciplines. Setting a wakeup function is done using the primitive rciWakeupOn() (q.v.).

Using rciOnInterrupt() ensures that an RCI task is woken up once and only once for every interrupt it receives. The utility of this function is restricted to those RCI tasks which can actually be bound to interrupts: tasks running on the arbiter CPU and connected to an RCI device interrupt, or tasks running on the arbiter CPU connected to a UNIX signal (via the ON_SIGNAL discipline).

To establish this function as a wakeup function, the following call should be made:
        rciWakeupOn (td, rciOnInterrupt, (int)td);

Normally, this is done from the task's startup function, but this is not necessary.

Using rciTimeReady() causes emulation of the ON_CLOCK scheduling discipline; i.e., it will make the task runnable whenever
        ((t - o)i) == 0

where t is the elapsed time since the task was started, and i and o are the task interval and offset given by the primitive rciRate().

To establish this function as a wakeup function, the following call should be made:
        rciWakeupOn (td, rciTimeReady, (int)td);

SEE ALSO
rciScheduling(3), rciRate(3), rciWakeupOn(3), controlFxns(7).