Skip to content
Commit 44d61bde authored by Marcin Niestroj's avatar Marcin Niestroj Committed by jgl-meta
Browse files

posix: eventfd: fix waking up poll()



Fix a regression introduced by commit e6eb0a70 ("posix: eventfd: revise
locking, signaling, and allocation"), which was a complete rewrite stating
that:

  The `wait_q` and `k_poll_signal` entries were removed from
  `struct eventfd` as they were unnecessary.

In fact, `k_poll_signal` (both `read_sig` and `write_sig`) were used to
wake-up blocking `poll()` invocation in another thread. This is no longer
the case now, i.e. `poll(..., POLLIN)` does not return after calling
`eventfd_write()` on the observed (polled) FD.

Fix this regression by bringing back `read_sig` and `write_sig` to very
similar state as it was before.

Fixes: e6eb0a70 ("posix: eventfd: revise locking, signaling, and
  allocation")
Signed-off-by: default avatarMarcin Niestroj <m.niestroj@emb.dev>
parent 9ef019d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment