Skip to content

Conversation

@krobelus
Copy link
Contributor

@krobelus krobelus commented Nov 16, 2025

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)

Comment on lines 2206 to 2208
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;
Copy link
Member

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?

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in the Android module

cc @maurer

@krobelus
Copy link
Contributor Author

krobelus commented Nov 17, 2025 via email

Like FreeBSD, NetBSD supports eventfd, see
https://man.netbsd.org/eventfd.2.
OpenBSD does not AFAICT.

While at, it make the already define eventfd* argument names match
the respective OSs man pages (or header files).
@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2025

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.

@tgross35
Copy link
Contributor

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 libc-test/build.rs.

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.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(updating status)

@rustbot
Copy link
Collaborator

rustbot commented Nov 19, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@krobelus
Copy link
Contributor Author

Why is the arg name changed in all the other files? That should be dropped,

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).

or at least moved to a separate commit if there is a reason.

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants