Verified Commit c9a70849 authored by jD91mZM2's avatar jD91mZM2
Browse files

Redox OS support

parent 12e18e59
......@@ -23,7 +23,7 @@ exclude = [
[features]
with-deprecated = []
default = ["with-deprecated"]
default = []
[dependencies]
lazycell = "0.6.0"
......
......@@ -956,7 +956,6 @@ impl<T: Into<Ready>> ops::SubAssign<T> for Ready {
}
#[deprecated(since = "0.6.10", note = "removed")]
#[cfg(feature = "with-deprecated")]
#[doc(hidden)]
impl ops::Not for Ready {
type Output = Ready;
......
......@@ -93,7 +93,7 @@
#![doc(html_root_url = "https://docs.rs/mio/0.6.14")]
#![crate_name = "mio"]
#![deny(warnings, missing_docs, missing_debug_implementations)]
#![deny(missing_docs, missing_debug_implementations)]
extern crate lazycell;
extern crate net2;
......@@ -184,7 +184,6 @@ pub use event::{
};
#[deprecated(since = "0.6.5", note = "use events:: instead")]
#[cfg(feature = "with-deprecated")]
#[doc(hidden)]
pub use event::{Event, Evented};
......
......@@ -91,7 +91,9 @@ impl Selector {
pub fn register(&self, fd: RawFd, token: Token, interests: Ready, opts: PollOpt) -> io::Result<()> {
let mut info = libc::epoll_event {
events: ioevent_to_epoll(interests, opts),
u64: usize::from(token) as u64
u64: usize::from(token) as u64,
#[cfg(target_os = "redox")]
_pad: 0,
};
unsafe {
......@@ -104,7 +106,9 @@ impl Selector {
pub fn reregister(&self, fd: RawFd, token: Token, interests: Ready, opts: PollOpt) -> io::Result<()> {
let mut info = libc::epoll_event {
events: ioevent_to_epoll(interests, opts),
u64: usize::from(token) as u64
u64: usize::from(token) as u64,
#[cfg(target_os = "redox")]
_pad: 0,
};
unsafe {
......@@ -121,6 +125,8 @@ impl Selector {
let mut info = libc::epoll_event {
events: 0,
u64: 0,
#[cfg(target_os = "redox")]
_pad: 0,
};
unsafe {
......@@ -232,7 +238,9 @@ impl Events {
pub fn push_event(&mut self, event: Event) {
self.events.push(libc::epoll_event {
events: ioevent_to_epoll(event.readiness(), PollOpt::empty()),
u64: usize::from(event.token()) as u64
u64: usize::from(event.token()) as u64,
#[cfg(target_os = "redox")]
_pad: 0,
});
}
......
......@@ -3,10 +3,10 @@ use libc::{self, c_int};
#[macro_use]
pub mod dlsym;
#[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris", target_os = "redox"))]
mod epoll;
#[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "solaris", target_os = "redox"))]
pub use self::epoll::{Events, Selector};
#[cfg(any(target_os = "bitrig", target_os = "dragonfly",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment