mirror of https://github.com/mkerrisk/man-pages
select.2: Show correspondence between select() and poll() readiness notifications
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
84ec7d432b
commit
ab264bff4f
|
@ -469,6 +469,30 @@ when
|
||||||
.B _GNU_SOURCE
|
.B _GNU_SOURCE
|
||||||
is defined.
|
is defined.
|
||||||
Since glibc 2.2.2, the requirements are as shown in the SYNOPSIS.
|
Since glibc 2.2.2, the requirements are as shown in the SYNOPSIS.
|
||||||
|
.\"
|
||||||
|
.SS Correspondence between select() and poll() notifications
|
||||||
|
Within the Linux kernel source,
|
||||||
|
.\" fs/select.c
|
||||||
|
we find the following definitions which show the correspondence
|
||||||
|
between the readable, writable, and exceptional condition notifications of
|
||||||
|
.BR select ()
|
||||||
|
and the event notifications provided by
|
||||||
|
.BR poll (2)
|
||||||
|
(and
|
||||||
|
.BR epoll (7)):
|
||||||
|
|
||||||
|
.nf
|
||||||
|
.in +4n
|
||||||
|
#define POLLIN_SET (POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP |
|
||||||
|
POLLERR)
|
||||||
|
/* Ready for reading */
|
||||||
|
#define POLLOUT_SET (POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR)
|
||||||
|
/* Ready for writing */
|
||||||
|
#define POLLEX_SET (POLLPRI)
|
||||||
|
/* Exceptional condition */
|
||||||
|
.in
|
||||||
|
.fi
|
||||||
|
.\"
|
||||||
.SS Multithreaded applications
|
.SS Multithreaded applications
|
||||||
If a file descriptor being monitored by
|
If a file descriptor being monitored by
|
||||||
.BR select ()
|
.BR select ()
|
||||||
|
|
Loading…
Reference in New Issue