Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Fuchsia #1811

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
- aarch64-apple-watchos
- aarch64-linux-android
- aarch64-unknown-freebsd
- aarch64-unknown-fuchsia
- aarch64-unknown-hermit
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
Expand All @@ -164,6 +165,7 @@ jobs:
- x86_64-pc-windows-msvc
- x86_64-unknown-dragonfly
- x86_64-unknown-freebsd
- x86_64-unknown-fuchsia
- x86_64-unknown-haiku
- x86_64-unknown-hermit
- x86_64-unknown-illumos
Expand Down
3 changes: 3 additions & 0 deletions src/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
not(mio_unsupported_force_poll_poll),
not(any(
target_os = "espidf",
target_os = "fuchsia",
target_os = "haiku",
target_os = "hermit",
target_os = "nto",
Expand Down Expand Up @@ -439,6 +440,7 @@ impl Poll {
not(mio_unsupported_force_poll_poll),
not(any(
target_os = "espidf",
target_os = "fuchsia",
target_os = "haiku",
target_os = "hermit",
target_os = "nto",
Expand Down Expand Up @@ -738,6 +740,7 @@ impl fmt::Debug for Registry {
not(any(
target_os = "espidf",
target_os = "haiku",
target_os = "fuchsia",
target_os = "hermit",
target_os = "nto",
target_os = "solaris",
Expand Down
6 changes: 3 additions & 3 deletions src/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cfg_os_poll! {

cfg_io_source! {
// Both `kqueue` and `epoll` don't need to hold any user space state.
#[cfg(not(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita")))]
#[cfg(not(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "fuchsia", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita")))]
mod stateless_io_source {
use std::io;
use std::os::fd::RawFd;
Expand Down Expand Up @@ -88,10 +88,10 @@ cfg_os_poll! {
}
}

#[cfg(not(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita")))]
#[cfg(not(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "fuchsia", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita")))]
pub(crate) use self::stateless_io_source::IoSourceState;

#[cfg(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita"))]
#[cfg(any(mio_unsupported_force_poll_poll, target_os = "espidf", target_os = "fuchsia", target_os = "haiku", target_os = "hermit", target_os = "nto", target_os = "solaris", target_os = "vita"))]
pub(crate) use self::selector::IoSourceState;
}

Expand Down
2 changes: 2 additions & 0 deletions src/sys/unix/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub(crate) fn new_raw() -> io::Result<[RawFd; 2]> {
target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "linux",
target_os = "netbsd",
target_os = "openbsd",
Expand Down Expand Up @@ -62,6 +63,7 @@ pub(crate) fn new_raw() -> io::Result<[RawFd; 2]> {
target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
target_os = "illumos",
target_os = "ios",
Expand Down
3 changes: 3 additions & 0 deletions src/sys/unix/selector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub(crate) use self::epoll::{event, Event, Events, Selector};
#[cfg(any(
mio_unsupported_force_poll_poll,
target_os = "espidf",
target_os = "fuchsia",
target_os = "haiku",
target_os = "hermit",
target_os = "nto",
Expand All @@ -34,6 +35,7 @@ mod poll;
#[cfg(any(
mio_unsupported_force_poll_poll,
target_os = "espidf",
target_os = "fuchsia",
target_os = "haiku",
target_os = "hermit",
target_os = "nto",
Expand All @@ -46,6 +48,7 @@ cfg_io_source! {
#[cfg(any(
mio_unsupported_force_poll_poll,
target_os = "espidf",
target_os = "fuchsia",
target_os = "haiku",
target_os = "hermit",
target_os = "nto",
Expand Down
1 change: 1 addition & 0 deletions src/sys/unix/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub(crate) fn accept(listener: &net::TcpListener) -> io::Result<(net::TcpStream,
all(not(target_arch="x86"), target_os = "android"),
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "illumos",
target_os = "linux",
target_os = "netbsd",
Expand Down
7 changes: 5 additions & 2 deletions src/sys/unix/waker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod fdbased {

#[cfg(all(
not(mio_unsupported_force_waker_pipe),
any(target_os = "linux", target_os = "android"),
any(target_os = "android", target_os = "fuchsia", target_os = "linux"),
))]
use crate::sys::unix::waker::eventfd::WakerInternal;
#[cfg(any(
Expand Down Expand Up @@ -89,6 +89,7 @@ pub use self::fdbased::Waker;
any(
target_os = "android",
target_os = "espidf",
target_os = "fuchsia",
target_os = "hermit",
target_os = "linux",
)
Expand Down Expand Up @@ -145,7 +146,8 @@ mod eventfd {
#[cfg(any(
mio_unsupported_force_poll_poll,
target_os = "espidf",
target_os = "hermit"
target_os = "fuchsia",
target_os = "hermit",
))]
pub fn ack_and_reset(&self) {
let _ = self.reset();
Expand Down Expand Up @@ -177,6 +179,7 @@ mod eventfd {
any(
mio_unsupported_force_poll_poll,
target_os = "espidf",
target_os = "fuchsia",
target_os = "hermit",
)
))]
Expand Down