eventfd_ctx_read (9) - Linux Manuals
eventfd_ctx_read: Reads the eventfd counter or wait if it is zero.
eventfd_ctx_read - Reads the eventfd counter or wait if it is zero.
ssize_t eventfd_ctx_read(struct eventfd_ctx
* ctx, int no_wait, __u64 * cnt);
- [in] Pointer to eventfd context.
- [in] Different from zero if the operation should not block.
- [out] Pointer to the 64-bit counter value.
-EAGAIN : The operation would have blocked but no_wait was non-zero. -ERESTARTSYS : A signal interrupted the wait operation.