home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / poll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  1.5 KB  |  51 lines

  1. /*
  2.  *    @(#) poll.h 1.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  13.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  14.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  15.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  16.  */
  17.  
  18. /*
  19.  * Structure of file descriptor/event pairs supplied in
  20.  * the poll arrays.
  21.  */
  22. struct pollfd {
  23.     int fd;                /* file desc to poll */
  24.     short events;            /* events of interest on fd */
  25.     short revents;            /* events that occurred on fd */
  26. };
  27.  
  28. /*
  29.  * Testable select events 
  30.  */
  31. #define POLLIN        01        /* fd is readable */
  32. #define POLLPRI        02        /* priority info at fd */
  33. #define    POLLOUT        04        /* fd is writeable (won't block) */
  34.  
  35. /*
  36.  * Non-testable poll events (may not be specified in events field,
  37.  * but may be returned in revents field).
  38.  */
  39. #define POLLERR        010        /* fd has error condition */
  40. #define POLLHUP        020        /* fd has been hung up on */
  41. #define POLLNVAL    040        /* invalid pollfd entry */
  42.  
  43. /*
  44.  * Number of pollfd entries to read in at a time in poll.
  45.  * The larger the value the better the performance, up to the
  46.  * maximum number of open files allowed.  Large numbers will
  47.  * use excessive amounts of kernel stack space.
  48.  */
  49. #define NPOLLFILE    20
  50.  
  51.