use crate::backend;
use crate::io::{self, OwnedFd};
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
pub use backend::io::types::PipeFlags;
#[cfg(not(any(
windows,
target_os = "illumos",
target_os = "redox",
target_os = "wasi",
)))]
pub const PIPE_BUF: usize = backend::io::types::PIPE_BUF;
#[inline]
pub fn pipe() -> io::Result<(OwnedFd, OwnedFd)> {
backend::io::syscalls::pipe()
}
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
#[inline]
#[doc(alias = "pipe2")]
pub fn pipe_with(flags: PipeFlags) -> io::Result<(OwnedFd, OwnedFd)> {
backend::io::syscalls::pipe_with(flags)
}