NAME
          irAddPoll, irRemovePoll, irPoll - add/remove entry from the
          poll call out table, allow IRAPI to poll

     SYNOPSIS
          #include <irapi.h>

          int irAddPoll (int fd, short events, int (*funcp)(int fd,
          short revents));

          int irRemovePoll (int fd);

          void irPoll ();

     DESCRIPTION
          The function irAddPoll adds file descriptor fd to the IRAPI
          poll callout table.  If fd is already in the poll callout
          table, the events mask is updated with the new value.  IRAPI
          will poll for events (see poll(2)) on the specified file
          descriptor upon receipt of SIGPOLL.  In most cases, applica-
          tions will poll for event POLLIN.  If revents is non-zero,
          IRAPI will call funcp passing it the file descriptor fd and
          the resulting events ( revents).  If revents matches
          POLLHUP, POLLERR or POLLNVAL, fd will be automatically
          removed from the IRAPI poll call out table before calling
          funcp.  The caller is responsible for setting events on fd,
          for example, using ioctl(2):

          ioctl(fd, I_SETSIG, S_RDNORM)

          The function irRemovePoll removes fd from the IRAPI poll
          call out table.

          These functions are to be used for applications attempting
          to multiplex input from irWait(3IRAPI) and other file
          descriptors in place of:

          sigset(SIGPOLL, catch_poll)

          If applications attempt to catch SIGPOLL, IRAPI functional-
          ity will be impaired unless they call the function irPoll()
          from their SIGPOLL handler, thereby allowing IRAPI to handle
          internal events.

     EVENTS
          There are no events resulting from the calls to these func-
          tions.

     RETURN VALUE
          IRR_OK on success.

          IRR_FAIL on error.

     ERROR
          On error irError is set as follows:

          IRER_SYSERROR on system call failure (see irSysError for
          more information).

          IRER_INVALID if fd is invalid or funcp is the NULL pointer.

          IRER_OVERFLOW if attempting to add more than IRD_MAXPOLL
          entries to the poll callout table.

     SEE ALSO
          irWait(3IRAPI), irWCheck(3IRAPI)

     VERSION
          This is version 11/25/02 of this man page.