mirror of https://github.com/mkerrisk/man-pages
epoll_wait.2: A few minor additions and rewrites
And add self to copyright, since, by now, the majority of the text in the page has now been (re)written by me. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
ee9c94436f
commit
23a169f749
|
@ -1,5 +1,6 @@
|
||||||
.\" Copyright (C) 2003 Davide Libenzi
|
.\" Copyright (C) 2003 Davide Libenzi
|
||||||
.\" Davide Libenzi <davidel@xmailserver.org>
|
.\" Davide Libenzi <davidel@xmailserver.org>
|
||||||
|
.\" and Copyright 2007, 2012, 2014, 2018 Michael Kerrisk <tk.manpages@gmail.com>
|
||||||
.\"
|
.\"
|
||||||
.\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
|
.\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
|
||||||
.\" This program is free software; you can redistribute it and/or modify
|
.\" This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -39,9 +40,11 @@ system call waits for events on the
|
||||||
.BR epoll (7)
|
.BR epoll (7)
|
||||||
instance referred to by the file descriptor
|
instance referred to by the file descriptor
|
||||||
.IR epfd .
|
.IR epfd .
|
||||||
The memory area pointed to by
|
The buffer pointed to by
|
||||||
.I events
|
.I events
|
||||||
will contain the events that will be available for the caller.
|
is used to return information from the ready list
|
||||||
|
about file descriptors in the interest list that
|
||||||
|
have some events available.
|
||||||
Up to
|
Up to
|
||||||
.I maxevents
|
.I maxevents
|
||||||
are returned by
|
are returned by
|
||||||
|
@ -58,12 +61,15 @@ will block.
|
||||||
Time is measured against the
|
Time is measured against the
|
||||||
.B CLOCK_MONOTONIC
|
.B CLOCK_MONOTONIC
|
||||||
clock.
|
clock.
|
||||||
The call will block until either:
|
.PP
|
||||||
.IP * 3
|
A call to
|
||||||
|
.BR epoll_wait ()
|
||||||
|
will block until either:
|
||||||
|
.IP \(bu 2
|
||||||
a file descriptor delivers an event;
|
a file descriptor delivers an event;
|
||||||
.IP *
|
.IP \(bu
|
||||||
the call is interrupted by a signal handler; or
|
the call is interrupted by a signal handler; or
|
||||||
.IP *
|
.IP \(bu
|
||||||
the timeout expires.
|
the timeout expires.
|
||||||
.PP
|
.PP
|
||||||
Note that the
|
Note that the
|
||||||
|
@ -103,14 +109,22 @@ struct epoll_event {
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.I data
|
.I data
|
||||||
field of each returned structure contains the same data as was specified
|
field of each returned
|
||||||
|
.I epoll_event
|
||||||
|
structure contains the same data as was specified
|
||||||
in the most recent call to
|
in the most recent call to
|
||||||
.BR epoll_ctl (2)
|
.BR epoll_ctl (2)
|
||||||
.RB ( EPOLL_CTL_ADD ", " EPOLL_CTL_MOD )
|
.RB ( EPOLL_CTL_ADD ", " EPOLL_CTL_MOD )
|
||||||
for the corresponding open file description.
|
for the corresponding open file descriptor.
|
||||||
|
.PP
|
||||||
The
|
The
|
||||||
.I events
|
.I events
|
||||||
field contains the returned event bit field.
|
field is a bit mask that indicates the events that have occurred for the
|
||||||
|
corresponding open file description.
|
||||||
|
See
|
||||||
|
.BR epoll_ctl (2)
|
||||||
|
for a list of the bits that may appear in this mask.
|
||||||
|
.\"
|
||||||
.SS epoll_pwait()
|
.SS epoll_pwait()
|
||||||
The relationship between
|
The relationship between
|
||||||
.BR epoll_wait ()
|
.BR epoll_wait ()
|
||||||
|
|
Loading…
Reference in New Issue