• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use crate::{backend, io};
2 
3 pub use backend::io::poll_fd::{PollFd, PollFlags};
4 
5 /// `poll(self.fds, timeout)`
6 ///
7 /// # References
8 ///  - [POSIX]
9 ///  - [Linux]
10 ///  - [Apple]
11 ///  - [Winsock2]
12 ///
13 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
14 /// [Linux]: https://man7.org/linux/man-pages/man2/poll.2.html
15 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/poll.2.html
16 /// [Winsock2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsapoll
17 #[inline]
poll(fds: &mut [PollFd<'_>], timeout: i32) -> io::Result<usize>18 pub fn poll(fds: &mut [PollFd<'_>], timeout: i32) -> io::Result<usize> {
19     backend::io::syscalls::poll(fds, timeout)
20 }
21