Skip to content
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

refactor: remove EventFd::defuse() and EventFd::arm() #2452

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

SteveLauC
Copy link
Member

What does this PR do

  1. Remove EventFd::defuse() because it is a no-op, write(0)ing to an event fd does nothing. While in the documentation, it says:

    a following call to poll, select or epoll will block.

    which means that this method should reset the kernel counter to 0, but it won't.

  2. Remove EventFd::arm() for symmetry reasons.

Having read()/write() is already sufficient for usage.

Closes #2422

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@SteveLauC SteveLauC enabled auto-merge June 17, 2024 00:21
@SteveLauC SteveLauC added this pull request to the merge queue Jun 17, 2024
Merged via the queue into nix-rust:master with commit 95bedfd Jun 17, 2024
36 checks passed
@SteveLauC SteveLauC deleted the fix/remove_arm_defuse_eventfd branch June 17, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EventFd::defuse doesn't work
1 participant