home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / poll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.2 KB  |  44 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:poll.h    1.3"
  10.  
  11. /*
  12.  * Structure of file descriptor/event pairs supplied in
  13.  * the poll arrays.
  14.  */
  15. struct pollfd {
  16.     int fd;                /* file desc to poll */
  17.     short events;            /* events of interest on fd */
  18.     short revents;            /* events that occurred on fd */
  19. };
  20.  
  21. /*
  22.  * Testable select events 
  23.  */
  24. #define POLLIN        01        /* fd is readable */
  25. #define POLLPRI        02        /* priority info at fd */
  26. #define    POLLOUT        04        /* fd is writeable (won't block) */
  27.  
  28. /*
  29.  * Non-testable poll events (may not be specified in events field,
  30.  * but may be returned in revents field).
  31.  */
  32. #define POLLERR        010        /* fd has error condition */
  33. #define POLLHUP        020        /* fd has been hung up on */
  34. #define POLLNVAL    040        /* invalid pollfd entry */
  35.  
  36. /*
  37.  * Number of pollfd entries to read in at a time in poll.
  38.  * The larger the value the better the performance, up to the
  39.  * maximum number of open files allowed.  Large numbers will
  40.  * use excessive amounts of kernel stack space.
  41.  */
  42. #define NPOLLFILE    20
  43.  
  44.