posix: eventfd: fix waking up poll()
Fix a regression introduced by commit e6eb0a705bc8 ("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: e6eb0a705bc8 ("posix: eventfd: revise locking, signaling, and
allocation")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1 file changed