aboutsummaryrefslogtreecommitdiff
path: root/src/io/driver/ready.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-25 20:05:29 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-25 20:05:29 +0000
commit2f0421fc344db1fc129b5ece09f6c9b662648c2e (patch)
tree7c474e5234417d4e078c4a115ce27112bf34c301 /src/io/driver/ready.rs
parent6c9a00a78b690ca3f86b75d07c5270e21facad62 (diff)
parentb8563af5d8e399995ad8a5d01bf40ee260885b32 (diff)
downloadtokio-android12-mainline-mediaprovider-release.tar.gz
Change-Id: I1319ffb9800fb9ba5c4f6e30ce14f5fe2ae7153b
Diffstat (limited to 'src/io/driver/ready.rs')
-rw-r--r--src/io/driver/ready.rs23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/io/driver/ready.rs b/src/io/driver/ready.rs
index 2ac01bd..2430d30 100644
--- a/src/io/driver/ready.rs
+++ b/src/io/driver/ready.rs
@@ -38,6 +38,17 @@ impl Ready {
pub(crate) fn from_mio(event: &mio::event::Event) -> Ready {
let mut ready = Ready::EMPTY;
+ #[cfg(all(target_os = "freebsd", feature = "net"))]
+ {
+ if event.is_aio() {
+ ready |= Ready::READABLE;
+ }
+
+ if event.is_lio() {
+ ready |= Ready::READABLE;
+ }
+ }
+
if event.is_readable() {
ready |= Ready::READABLE;
}
@@ -57,7 +68,7 @@ impl Ready {
ready
}
- /// Returns true if `Ready` is the empty set
+ /// Returns true if `Ready` is the empty set.
///
/// # Examples
///
@@ -71,7 +82,7 @@ impl Ready {
self == Ready::EMPTY
}
- /// Returns `true` if the value includes `readable`
+ /// Returns `true` if the value includes `readable`.
///
/// # Examples
///
@@ -87,7 +98,7 @@ impl Ready {
self.contains(Ready::READABLE) || self.is_read_closed()
}
- /// Returns `true` if the value includes writable `readiness`
+ /// Returns `true` if the value includes writable `readiness`.
///
/// # Examples
///
@@ -103,7 +114,7 @@ impl Ready {
self.contains(Ready::WRITABLE) || self.is_write_closed()
}
- /// Returns `true` if the value includes read-closed `readiness`
+ /// Returns `true` if the value includes read-closed `readiness`.
///
/// # Examples
///
@@ -118,7 +129,7 @@ impl Ready {
self.contains(Ready::READ_CLOSED)
}
- /// Returns `true` if the value includes write-closed `readiness`
+ /// Returns `true` if the value includes write-closed `readiness`.
///
/// # Examples
///
@@ -143,7 +154,7 @@ impl Ready {
(self & other) == other
}
- /// Create a `Ready` instance using the given `usize` representation.
+ /// Creates a `Ready` instance using the given `usize` representation.
///
/// The `usize` representation must have been obtained from a call to
/// `Readiness::as_usize`.