-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Expose the "epoll_pwait2()" function #3868
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
It looks like all failures here a related to musl. I've tried to use P.S. I've looked up musl source code, and I haven't found a wrapper function for |
Now all the checks are passing, the pull request is ready for review. |
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.
Thanks! Can you squash please?
1b601ef
to
f3415c6
Compare
OK, squashed. |
Thanks, looks like the CI failure was spurious so hopefully it passes this time. |
The ```epoll_pwait2()``` function has been moved to linux/gnu
f3415c6
to
f3756b9
Compare
Thank you! |
@tgross35 |
It has the stable-nominated label already |
Oh, I see (I've looked at the labels now), thank you! |
The ```epoll_pwait2()``` function has been moved to linux/gnu (backport <rust-lang#3868>) (cherry picked from commit f3756b9)
The ```epoll_pwait2()``` function has been moved to linux/gnu (backport <rust-lang#3868>) (cherry picked from commit f3756b9)
Hello everyone!
I propose exposing the
epoll_pwait2()
function. Epoll is a event polling/waiting feature in Linux. It is similar topoll()
, but whilepoll()
requires passing an event list on each call, epoll works by creating a file descriptor which can be filled with events on file descriptors and then be waited/polled multiple times. File descriptors and events can be added, modified and deleted during epoll fd lifetime, which is good for server applications -- they can watch the listening socket and register connection sockets for watching.Polling and waiting happens by calling
epoll_wait()
,epoll_pwait()
orepoll_pwait2()
. The first system call implements only millisecond precision of wait timeout and does not provide a way to atomically alter the signal mask during wait. The second system call accepts a signal mask that will be the signal mask of the waiting thread until the system call returns. The third system call also allows setting the timeout with nanosecond precision. The libc crates exposes the first two but not the third one.Related man-page