poll.h 517 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _POLL_H
  2. #define _POLL_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define POLLIN 0x001
  7. #define POLLPRI 0x002
  8. #define POLLOUT 0x004
  9. #define POLLERR 0x008
  10. #define POLLHUP 0x010
  11. #define POLLNVAL 0x020
  12. #define POLLRDNORM 0x040
  13. #define POLLRDBAND 0x080
  14. #define POLLWRNORM 0x100
  15. #define POLLWRBAND 0x200
  16. #define POLLMSG 0x400
  17. typedef unsigned int nfds_t;
  18. struct pollfd
  19. {
  20. int fd;
  21. short events;
  22. short revents;
  23. };
  24. int poll (struct pollfd *, nfds_t, int);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif