|EVENTFD_CTX_READ(9)||Events based on file descripto||EVENTFD_CTX_READ(9)|
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);
Returns 0 if successful, or the following error codes:
-EAGAIN : The operation would have blocked but no_wait was non-zero. -ERESTARTSYS : A signal interrupted the wait operation.
If no_wait is zero, the function might sleep until the eventfd internal counter becomes greater than zero.
|January 2017||Kernel Hackers Manual 4.8.|