poll.h - definitions for the poll() function
#include <poll.h>
The <poll.h> header defines the pollfd structure that includes at least the following member:int fd the following descriptor being polled short int events the input event flags (see below) short int revents the output event flags (see below)
The <poll.h> header defines the following type through typedef:
- nfds_t
- An unsigned integral type used for the number of file descriptors.
The following symbolic constants are defined, zero or more of which may be OR-ed together to form the events or revents members in the pollfd structure:
- POLLIN
- Same effect as POLLRDNORM | POLLRDBAND.
- POLLRDNORM
- Data on priority band 0 may be read.
- POLLRDBAND
- Data on priority bands greater than 0 may be read.
- POLLPRI
- High priority data may be read.
- POLLOUT
- Same value as POLLWRNORM.
- POLLWRNORM
- Data on priority band 0 may be written.
- POLLWRBAND
- Data on priority bands greater than 0 may be written. This event only examines bands that have been written to at least once.
- POLLERR
- An error has occurred (revents only).
- POLLHUP
- Device has been disconnected (revents only).
- POLLNVAL
- Invalid fd member (revents only).
The <poll.h> header declares the following function which may also be defined as a macro. Function prototypes must be provided for use with an ISO C compiler.
int poll(struct pollfd[], nfds_t, int);
None.
None.
poll().