-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Define eventfd on NetBSD #4830
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
base: main
Are you sure you want to change the base?
Define eventfd on NetBSD #4830
Conversation
f0917cc to
03be810
Compare
| pub fn eventfd(init: c_uint, flags: c_int) -> c_int; | ||
| pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int; | ||
| pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int; |
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.
Any reason that these fn args names don't match with man page?
03be810 to
2bf5e32
Compare
|
+ pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;
Any reason that these fn args names don't match with man page?
I might have copied it from the FreeBSD ones. Fixed
|
2bf5e32 to
916a8cf
Compare
This comment has been minimized.
This comment has been minimized.
|
Please include permalinks to the headers too, manpages don't show the values. In this case: https://github.com/NetBSD/src/blob/d04b0c735abc997743bb3faa74464524cbe7becd/sys/sys/eventfd.h. To fix the CI failure you'll need to add the relevant header to Why is the arg name changed in all the other files? That should be dropped, or at least moved to a separate commit if there is a reason. |
tgross35
left a comment
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.
(updating status)
|
Reminder, once the PR becomes ready for a review, use |
I forgot to copy the commit message to the PR description - this is to match the OS manpages (or headers where I didn't find manpages).
sure |
916a8cf to
7b5296c
Compare
Like FreeBSD but unlike OpenBSD, NetBSD supports eventfd since version 10 (September 2021, see http://netbsd.org/changes/changes-10.0.html). I don't know enough about NetBSD to know whether all systems running 10 can be expected to have eventfd, but it's probably fine. Our GitHub actions CI only tests NetBSD 10.1. Ref: https://man.netbsd.org/eventfd.2 Ref: https://github.com/NetBSD/src/blob/d04b0c735abc997743bb3faa74464524cbe7becd/sys/sys/eventfd.h
7b5296c to
54559ab
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
split commits and updated tests and commit messages. |
Like FreeBSD, NetBSD supports eventfd, see
https://man.netbsd.org/eventfd.2.
OpenBSD does not AFAICT.
(for some reason my local rustfmt wants to reformat imports)