Struct hinix::eventfd::EventFd [−][src]
pub struct EventFd { /* fields omitted */ }
An event object that can be used as a wait/notify mechanism between user-space applications, threads in an app, or between the kernel and user-space.
This is a simpler, more efficient signaling mechanism than a pipe, if event notification is all that is required by the application.
The event is seen as a normal file handle, and thus can be used in combination with other handles such as from sockets, pipes, etc, in a poll/epoll/select call to provide additional signaling capabilities.
Methods
impl EventFd
[src]
impl EventFd
pub fn new(initval: c_uint, flags: EfdFlags) -> Result<EventFd>
[src]
pub fn new(initval: c_uint, flags: EfdFlags) -> Result<EventFd>
Create a new event object.
Parameters
initval
The initial value held by the object
flags
The flags used to create the object
http://man7.org/linux/man-pages/man2/eventfd.2.html
pub fn read(&self) -> Result<u64>
[src]
pub fn read(&self) -> Result<u64>
Reads the value of the event object
pub fn write(&self, val: u64) -> Result<()>
[src]
pub fn write(&self, val: u64) -> Result<()>