#include <sys/poll.h>

sys/poll.h

This file is intended to be compatible with the traditional poll.h.
includes: sys/cdefs.h
15 macros · 1 struct · 1 typedef · 1 function

macroPOLLIN

Requestable events. If poll(2) finds any of these set, they are copied to revents on return.
#define POLLIN 0x0001
any readable data available

macroPOLLPRI

#define POLLPRI 0x0002
OOB/Urgent readable data

macroPOLLOUT

#define POLLOUT 0x0004
file descriptor is writeable

macroPOLLRDNORM

#define POLLRDNORM 0x0040
non-OOB/URG data available

macroPOLLWRNORM

#define POLLWRNORM POLLOUT
no write type differentiation

macroPOLLRDBAND

#define POLLRDBAND 0x0080
OOB/Urgent readable data

macroPOLLWRBAND

#define POLLWRBAND 0x0100
OOB/Urgent data can be written

macroPOLLEXTEND

FreeBSD extensions: polling on a regular file might return one of these events (currently only supported on local filesystems).
#define POLLEXTEND 0x0200
file may have been extended

macroPOLLATTRIB

#define POLLATTRIB 0x0400
file attributes may have changed

macroPOLLWRITE

#define POLLWRITE 0x1000
file's contents may have changed

macroPOLLERR

These events are set if they occur regardless of whether they were requested.
#define POLLERR 0x0008
some poll error occurred

macroPOLLHUP

#define POLLHUP 0x0010
file descriptor was "hung up"

macroPOLLNVAL

#define POLLNVAL 0x0020
requested events "invalid"

structpollfd

size 8, align 4
intfd
shortevents
shortrevents

typedefnfds_t

typedef unsigned int nfds_t

functionpoll

__DARWIN_ALIAS_C(poll)
extern int poll(struct pollfd *, nfds_t, int)
This is defined here (instead of <poll.h>) because this is where traditional SVR4 code will look to find it.
man page · March 18, 2015
poll(2) — synchronous I/O multiplexing