|
|
1.1 ! root 1: /*++ ! 2: ! 3: Copyright (c) 1991 Microsoft Corporation ! 4: ! 5: Module Name: ! 6: ! 7: poll.h ! 8: ! 9: Abstract: ! 10: ! 11: Contains #defines, types, and macros for poll ! 12: ! 13: Author: ! 14: ! 15: Sam Patton (sampa) July 26, 1991 ! 16: ! 17: Revision History: ! 18: ! 19: --*/ ! 20: ! 21: #ifndef SYS_POLL_INCLUDED ! 22: #define SYS_POLL_INCLUDED ! 23: ! 24: /* ! 25: * Structure of file descriptor/event pairs supplied in ! 26: * the poll arrays. ! 27: */ ! 28: struct pollfd { ! 29: #ifndef _POSIX_SOURCE ! 30: HANDLE fd; /* file handle to poll */ ! 31: #else ! 32: int fd; /* file desc to poll */ ! 33: #endif ! 34: short events; /* events of interest on fd */ ! 35: short revents; /* events that occurred on fd */ ! 36: }; ! 37: ! 38: /* ! 39: * Testable select events ! 40: */ ! 41: #define POLLIN 01 /* fd is readable */ ! 42: #define POLLPRI 02 /* priority info at fd */ ! 43: #define POLLOUT 04 /* fd is writeable (won't block) */ ! 44: #define POLLMSG 0100 /* M_SIG or M_PCSIG arrived */ ! 45: ! 46: /* ! 47: * Non-testable poll events (may not be specified in events field, ! 48: * but may be returned in revents field). ! 49: */ ! 50: #define POLLERR 010 /* fd has error condition */ ! 51: #define POLLHUP 020 /* fd has been hung up on */ ! 52: #define POLLNVAL 040 /* invalid pollfd entry */ ! 53: ! 54: /* ! 55: * Number of pollfd entries to read in at a time in poll. ! 56: * The larger the value the better the performance, up to the ! 57: * maximum number of open files allowed. Large numbers will ! 58: * use excessive amounts of kernel stack space. ! 59: */ ! 60: #define NPOLLFILE 20 ! 61: ! 62: ! 63: /* ! 64: * Poll function prototype ! 65: * ! 66: */ ! 67: ! 68: int ! 69: poll( ! 70: IN OUT struct pollfd *, ! 71: IN unsigned int, ! 72: IN int); ! 73: ! 74: ! 75: #endif //SYS_POLL_INCLUDED
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.