-
Notifications
You must be signed in to change notification settings - Fork 761
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
Add AIX operating system support #1704
Conversation
src/sys/unix/waker.rs
Outdated
syscall!(pipe2(fds.as_mut_ptr(), libc::O_NONBLOCK | libc::O_CLOEXEC))?; | ||
#[cfg(target_os = "aix")] | ||
syscall!(pipe(fds.as_mut_ptr()))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to set the libc::O_NONBLOCK | libc::O_CLOEXEC
otherwise this will not work.
AIX does not have pipe2 system call. Use pipe with fcntl instead.
src/sys/unix/waker.rs
Outdated
@@ -265,6 +265,32 @@ mod pipe { | |||
} | |||
} | |||
} | |||
|
|||
#[cfg(target_os = "aix")] | |||
fn pipe2() -> io::Result<(RawFd, RawFd)> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is essentially the same code as in src/sys/unix/pipe.rs
, maybe we should reuse that code.
|
@ecnelises I've opened ecnelises#1 to solve that. |
This also adds a new function sys::unix::pipe::new_raw that creates a pipe, returning the raw fds. This is used by the Waker implementation and of course sys::unix::pipe::new (which is exposed as mio::unix::pipe::new).
Thanks @ecnelises |
AIX does not have
epoll
orkqueue
functionality, so it relies onforce_poll_poll
feature.