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

@rustbot

This comment has been minimized.

@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

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
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 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.

@krobelus
Copy link
Contributor Author

split commits and updated tests and commit messages.
I'm not sure if this works for 100% of all NetBSD 10 systems out there,
but this was introduced in 2021 so it might be fine.

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