Method lrs::event::Eventfd::get

Reads the value of the eventfd.

Syntax

impl Eventfd {
    fn get(&self) -> Result<u64, Errno>
}

Remarks

The returned value depends on the flags the eventfd was created with:

Default behavior

By default, the current value of the eventfd will be returned and the value of the eventfd value will be set to 0.

Semaphore behavior

If the EFD_SEMAPHORE flag was used, 1 is returned and the eventfd value is reduced by 1.

See also