poll.h 878 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef __ASM_GENERIC_POLL_H
  3. #define __ASM_GENERIC_POLL_H
  4. /* These are specified by iBCS2 */
  5. #define POLLIN 0x0001
  6. #define POLLPRI 0x0002
  7. #define POLLOUT 0x0004
  8. #define POLLERR 0x0008
  9. #define POLLHUP 0x0010
  10. #define POLLNVAL 0x0020
  11. /* The rest seem to be more-or-less nonstandard. Check them! */
  12. #define POLLRDNORM 0x0040
  13. #define POLLRDBAND 0x0080
  14. #ifndef POLLWRNORM
  15. #define POLLWRNORM 0x0100
  16. #endif
  17. #ifndef POLLWRBAND
  18. #define POLLWRBAND 0x0200
  19. #endif
  20. #ifndef POLLMSG
  21. #define POLLMSG 0x0400
  22. #endif
  23. #ifndef POLLREMOVE
  24. #define POLLREMOVE 0x1000
  25. #endif
  26. #ifndef POLLRDHUP
  27. #define POLLRDHUP 0x2000
  28. #endif
  29. #define POLLFREE (__poll_t)0x4000 /* currently only for epoll */
  30. #define POLL_BUSY_LOOP (__poll_t)0x8000
  31. struct pollfd {
  32. int fd;
  33. short events;
  34. short revents;
  35. };
  36. #endif /* __ASM_GENERIC_POLL_H */