"Has file descriptor had an I/O event occurred since we last monitored it?"
Somewhat similar to signal-driven I/O.
Each call to epoll_wait()removes items ready list.
File descriptor is only re-added to the ready list if an I/O event has
occurred since last epoll_wait() call.
If monitoring (say) a socket for input,
behavior of second epoll_wait()
call will vary depending on whether
notification is level-triggered or edge-triggered.
Input arrives on the socket.
We call epoll_wait();
regardless
of the model, the call says that the socket is ready.
We call epoll_wait().
Caller must mark file descriptors non-blocking
(O_NONBLOCK), because:
No further notification will occur until next I/O event.
Therefore we must perform as much I/O is possible...