1b8a62b91Sopenharmony_ci//! I/O operations.
2b8a62b91Sopenharmony_ci
3b8a62b91Sopenharmony_cimod close;
4b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
5b8a62b91Sopenharmony_cipub(crate) mod context;
6b8a62b91Sopenharmony_ci#[cfg(not(windows))]
7b8a62b91Sopenharmony_cimod dup;
8b8a62b91Sopenharmony_cimod errno;
9b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
10b8a62b91Sopenharmony_cimod eventfd;
11b8a62b91Sopenharmony_ci#[cfg(not(windows))]
12b8a62b91Sopenharmony_cimod fcntl;
13b8a62b91Sopenharmony_ci#[cfg(not(feature = "std"))]
14b8a62b91Sopenharmony_cipub(crate) mod fd;
15b8a62b91Sopenharmony_cimod ioctl;
16b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "redox")))]
17b8a62b91Sopenharmony_cimod is_read_write;
18b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "wasi")))]
19b8a62b91Sopenharmony_cimod pipe;
20b8a62b91Sopenharmony_cimod poll;
21b8a62b91Sopenharmony_ci#[cfg(all(feature = "procfs", any(target_os = "android", target_os = "linux")))]
22b8a62b91Sopenharmony_cimod procfs;
23b8a62b91Sopenharmony_ci#[cfg(not(windows))]
24b8a62b91Sopenharmony_cimod read_write;
25b8a62b91Sopenharmony_ci#[cfg(not(feature = "std"))]
26b8a62b91Sopenharmony_cimod seek_from;
27b8a62b91Sopenharmony_ci#[cfg(not(windows))]
28b8a62b91Sopenharmony_cimod stdio;
29b8a62b91Sopenharmony_ci
30b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
31b8a62b91Sopenharmony_cipub use crate::backend::io::epoll;
32b8a62b91Sopenharmony_cipub use close::close;
33b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "aix", target_os = "wasi")))]
34b8a62b91Sopenharmony_cipub use dup::{dup, dup2, dup3, DupFlags};
35b8a62b91Sopenharmony_cipub use errno::{retry_on_intr, Errno, Result};
36b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
37b8a62b91Sopenharmony_cipub use eventfd::{eventfd, EventfdFlags};
38b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "wasi")))]
39b8a62b91Sopenharmony_cipub use fcntl::fcntl_dupfd_cloexec;
40b8a62b91Sopenharmony_ci#[cfg(not(windows))]
41b8a62b91Sopenharmony_cipub use fcntl::{fcntl_getfd, fcntl_setfd, FdFlags};
42b8a62b91Sopenharmony_ci#[cfg(any(target_os = "ios", target_os = "macos"))]
43b8a62b91Sopenharmony_cipub use ioctl::ioctl_fioclex;
44b8a62b91Sopenharmony_cipub use ioctl::ioctl_fionbio;
45b8a62b91Sopenharmony_ci#[cfg(not(target_os = "redox"))]
46b8a62b91Sopenharmony_cipub use ioctl::ioctl_fionread;
47b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
48b8a62b91Sopenharmony_cipub use ioctl::{ioctl_blkpbszget, ioctl_blksszget};
49b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "haiku", target_os = "redox", target_os = "wasi")))]
50b8a62b91Sopenharmony_cipub use ioctl::{ioctl_tiocexcl, ioctl_tiocnxcl};
51b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "redox")))]
52b8a62b91Sopenharmony_ci#[cfg(all(feature = "fs", feature = "net"))]
53b8a62b91Sopenharmony_cipub use is_read_write::is_read_write;
54b8a62b91Sopenharmony_ci#[cfg(not(any(windows, target_os = "wasi")))]
55b8a62b91Sopenharmony_cipub use pipe::pipe;
56b8a62b91Sopenharmony_ci#[cfg(not(any(
57b8a62b91Sopenharmony_ci    windows,
58b8a62b91Sopenharmony_ci    target_os = "haiku",
59b8a62b91Sopenharmony_ci    target_os = "illumos",
60b8a62b91Sopenharmony_ci    target_os = "redox",
61b8a62b91Sopenharmony_ci    target_os = "solaris",
62b8a62b91Sopenharmony_ci    target_os = "wasi",
63b8a62b91Sopenharmony_ci)))]
64b8a62b91Sopenharmony_cipub use pipe::PIPE_BUF;
65b8a62b91Sopenharmony_ci#[cfg(not(any(
66b8a62b91Sopenharmony_ci    windows,
67b8a62b91Sopenharmony_ci    target_os = "aix",
68b8a62b91Sopenharmony_ci    target_os = "haiku",
69b8a62b91Sopenharmony_ci    target_os = "ios",
70b8a62b91Sopenharmony_ci    target_os = "macos",
71b8a62b91Sopenharmony_ci    target_os = "wasi"
72b8a62b91Sopenharmony_ci)))]
73b8a62b91Sopenharmony_cipub use pipe::{pipe_with, PipeFlags};
74b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
75b8a62b91Sopenharmony_cipub use pipe::{splice, vmsplice, IoSliceRaw, SpliceFlags};
76b8a62b91Sopenharmony_cipub use poll::{poll, PollFd, PollFlags};
77b8a62b91Sopenharmony_ci#[cfg(all(feature = "procfs", any(target_os = "android", target_os = "linux")))]
78b8a62b91Sopenharmony_cipub use procfs::{
79b8a62b91Sopenharmony_ci    proc_self_fd, proc_self_fdinfo_fd, proc_self_maps, proc_self_pagemap, proc_self_status,
80b8a62b91Sopenharmony_ci};
81b8a62b91Sopenharmony_ci#[cfg(not(windows))]
82b8a62b91Sopenharmony_cipub use read_write::{pread, pwrite, read, readv, write, writev, IoSlice, IoSliceMut};
83b8a62b91Sopenharmony_ci#[cfg(not(any(
84b8a62b91Sopenharmony_ci    windows,
85b8a62b91Sopenharmony_ci    target_os = "haiku",
86b8a62b91Sopenharmony_ci    target_os = "redox",
87b8a62b91Sopenharmony_ci    target_os = "solaris"
88b8a62b91Sopenharmony_ci)))]
89b8a62b91Sopenharmony_cipub use read_write::{preadv, pwritev};
90b8a62b91Sopenharmony_ci#[cfg(any(target_os = "android", target_os = "linux"))]
91b8a62b91Sopenharmony_cipub use read_write::{preadv2, pwritev2, ReadWriteFlags};
92b8a62b91Sopenharmony_ci#[cfg(not(feature = "std"))]
93b8a62b91Sopenharmony_cipub use seek_from::SeekFrom;
94b8a62b91Sopenharmony_ci#[cfg(feature = "std")]
95b8a62b91Sopenharmony_cipub use std::io::SeekFrom;
96b8a62b91Sopenharmony_ci#[cfg(not(windows))]
97b8a62b91Sopenharmony_cipub use stdio::{
98b8a62b91Sopenharmony_ci    raw_stderr, raw_stdin, raw_stdout, stderr, stdin, stdout, take_stderr, take_stdin, take_stdout,
99b8a62b91Sopenharmony_ci};
100