• Home
  • Raw
  • Download

Lines Matching +full:is +full:- +full:data +full:- +full:descriptor

3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
30 /// Sets the Edge Triggered behavior for the associated file descriptor.
32 /// The default behavior for epoll is Level Triggered.
34 /// The associated file is available for read operations.
36 /// Error condition happened on the associated file descriptor.
38 /// `wait` will always wait for this event; is not necessary to set it in events.
40 /// Hang up happened on the associated file descriptor.
42 /// `wait` will always wait for this event; it is not necessary to set it in events.
45 /// the channel will return 0 (end of file) only after all outstanding data in the
48 /// The associated file is available for write operations.
50 /// There is urgent data available for read operations.
54 /// This flag is especially useful for writing simple code to detect peer shutdown when
59 /// event is pending or being processed.
61 /// The event is considered as being "processed" from the time when it is returned by
63 /// descriptor, the closure of that file descriptor, the removal of the event file
64 /// descriptor with `EPOLL_CTL_DEL`, or the clearing of `EPOLLWAKEUP` for the event file
65 /// descriptor with `EPOLL_CTL_MOD`.
67 /// Sets the one-shot behavior for the associated file descriptor.
69 /// This means that after an event is pulled out with `wait` the associated file
70 /// descriptor is internally disabled and no other events will be reported by the epoll
72 /// descriptor with a new event mask.
74 /// Sets an exclusive wakeup mode for the epoll file descriptor that is being attached to
75 /// the target file descriptor, `fd`. When a wakeup event occurs and multiple epoll file
78 /// scenario (when `EPOLLEXCLUSIVE` is not set) is for all epoll file descriptors to
79 /// receive an event. `EPOLLEXCLUSIVE` is thus useful for avoiding thundering herd problems
82 /// If the same file descriptor is in multiple epoll instances, some with the
89 /// specified, but this is not required: as usual, these events are always reported if they
97 /// descriptor `fd` as an epoll instance will likewise fail. The error in all of these
98 /// cases is `EINVAL`.
100 /// The `EPOLLEXCLUSIVE` flag is an input flag for the `Event.events` field when calling
101 /// `ctl`; it is never returned by `wait`.
112 pub data: u64, field
116 pub fn new(events: Events, data: u64) -> Event { in new()
119 data: data, in new()
125 fn fmt(&self, f: &mut Formatter<'_>) -> Result { in fmt()
126 let data = self.data; in fmt() localVariable
129 .field("data", &data) in fmt()
134 /// Creates a new epoll file descriptor.
136 /// If `cloexec` is true, `FD_CLOEXEC` will be set on the returned file descriptor.
140 /// * `epoll_create1()` is the underlying syscall.
141 pub fn create(cloexec: bool) -> io::Result<RawFd> { in create()
152 ) -> io::Result<()> { in ctl()
162 /// * If `timeout` is negative, it will block until an event is received.
163 pub fn wait(epfd: RawFd, timeout: i32, buf: &mut [Event]) -> io::Result<usize> { in wait()
164 let timeout = if timeout < -1 { -1 } else { timeout }; in wait()
177 pub fn close(epfd: RawFd) -> io::Result<()> { in close()
182 fn cvt(result: libc::c_int) -> io::Result<libc::c_int> { in cvt()