package core
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=08447e7d539b69d13b2633c61bab5fdb81624b1391540be097a6a91023f9ce33
md5=571dc65fff922c86951068d66e4a05ca
doc/core.linux_ext/Linux_ext/Eventfd/index.html
Module Linux_ext.Eventfd
module Flags : sig ... endtype t = private Core.Unix.File_descr.tval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.tcreate ?flags init creates a new event file descriptor with init as the counter's initial value. With Linux 2.6.26 or earlier, flags must be empty.
val read : t -> Core.Int64.tread t will block until t's counter is nonzero, after which its behavior depends on whether t was created with the Flags.semaphore flag set. If it was set, then read t will return 1 and decrement t's counter. If it was not set, then read t will return the value of t's counter and set the counter to 0. The returned value should be interpreted as an unsigned 64-bit integer.
In the case that t was created with the Flags.nonblock flag set, this function will raise a Unix error with the error code EAGAIN or EWOULDBLOCK, instead of blocking.
val write : t -> Core.Int64.t -> unitwrite t v will block until t's counter is less than the max value of a uint64_t, after which it will increment t's counter by v, which will be interpreted as an unsigned 64-bit integer.
In the case that t was created with the Flags.nonblock flag set, this function will raise a Unix error with the error code EAGAIN or EWOULDBLOCK, instead of blocking.
val to_file_descr : t -> Core.Unix.File_descr.t