Skip to content

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
@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