eventfd_ctx_read(9)

eventfd_ctx_read9

Reads the eventfd counter or wait if it is zero.

Usage

ssize_t eventfd_ctx_read(struct eventfd_ctx * ctx, int no_wait, __u64 * cnt);

Arguments

ctx

[in] Pointer to eventfd context.

no_wait

[in] Different from zero if the operation should not block.

cnt

[out] Pointer to the 64-bit counter value.

Overview

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.

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.