summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/io/windows_syscalls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/io/windows_syscalls.rs')
-rw-r--r--vendor/rustix/src/backend/libc/io/windows_syscalls.rs18
1 files changed, 3 insertions, 15 deletions
diff --git a/vendor/rustix/src/backend/libc/io/windows_syscalls.rs b/vendor/rustix/src/backend/libc/io/windows_syscalls.rs
index 4c6e86f94..c87a2a247 100644
--- a/vendor/rustix/src/backend/libc/io/windows_syscalls.rs
+++ b/vendor/rustix/src/backend/libc/io/windows_syscalls.rs
@@ -1,12 +1,10 @@
//! Windows system calls in the `io` module.
-use super::super::c;
-use super::super::conv::{borrowed_fd, ret, ret_c_int};
-use super::super::fd::LibcFd;
+use crate::backend::c;
+use crate::backend::conv::{borrowed_fd, ret};
+use crate::backend::fd::LibcFd;
use crate::fd::{BorrowedFd, RawFd};
use crate::io;
-use crate::io::PollFd;
-use core::convert::TryInto;
use core::mem::MaybeUninit;
pub(crate) unsafe fn close(raw_fd: RawFd) {
@@ -27,13 +25,3 @@ pub(crate) fn ioctl_fionbio(fd: BorrowedFd<'_>, value: bool) -> io::Result<()> {
ret(c::ioctl(borrowed_fd(fd), c::FIONBIO, &mut data))
}
}
-
-pub(crate) fn poll(fds: &mut [PollFd<'_>], timeout: c::c_int) -> io::Result<usize> {
- let nfds = fds
- .len()
- .try_into()
- .map_err(|_convert_err| io::Errno::INVAL)?;
-
- ret_c_int(unsafe { c::poll(fds.as_mut_ptr().cast(), nfds, timeout) })
- .map(|nready| nready as usize)
-}