OSDN Git Service

(split) LDP: Update original to LDP v3.39.
[linuxjm/LDP_man-pages.git] / original / man2 / epoll_wait.2
index 2962ff4..d9d2a1e 100644 (file)
@@ -20,7 +20,7 @@
 .\"
 .\" 2007-04-30: mtk, Added description of epoll_pwait()
 .\"
-.TH EPOLL_WAIT 2 2009-01-17 "Linux" "Linux Programmer's Manual"
+.TH EPOLL_WAIT 2 2012-04-17 "Linux" "Linux Programmer's Manual"
 .SH NAME
 epoll_wait, epoll_pwait \- wait for an I/O event on an epoll file descriptor
 .SH SYNOPSIS
@@ -37,7 +37,7 @@ epoll_wait, epoll_pwait \- wait for an I/O event on an epoll file descriptor
 The
 .BR epoll_wait ()
 system call waits for events on the
-.B epoll
+.BR epoll (7)
 instance referred to by the file descriptor
 .IR epfd .
 The memory area pointed to by
@@ -51,19 +51,18 @@ The
 .I maxevents
 argument must be greater than zero.
 
-The call waits for a maximum time of
+The call blocks the calling thread for a maximum time of
 .I timeout
 milliseconds.
 Specifying a
 .I timeout
-of \-1 makes
+of \-1 causes
 .BR epoll_wait ()
-wait indefinitely, while specifying a
+to block indefinitely, while specifying a
 .I timeout
-equal to zero makes
+equal to zero cause
 .BR epoll_wait ()
-to return immediately even if no events are available
-(return code equal to zero).
+to return immediately, even if no events are available.
 
 The
 .I struct epoll_event
@@ -172,16 +171,28 @@ file descriptor, or
 .I maxevents
 is less than or equal to zero.
 .SH VERSIONS
-.BR epoll_pwait ()
-was added to Linux in kernel 2.6.19.
+.BR epoll_wait ()
+was added to the kernel in version 2.6.
+.\" To be precise: kernel 2.5.44.
+.\" The interface should be finalized by Linux kernel 2.5.66.
+Library support is provided in glibc starting with version 2.3.2.
 
-Glibc support for
 .BR epoll_pwait ()
-is provided starting with version 2.6.
+was added to Linux in kernel 2.6.19.
+Library support is provided in glibc starting with version 2.6.
 .SH CONFORMING TO
 .BR epoll_wait ()
-is Linux-specific, and was introduced in kernel 2.5.44.
-.\" The interface should be finalized by Linux kernel 2.5.66.
+is Linux-specific.
+.SH NOTES
+While one thread is blocked in a call to
+.BR epoll_pwait (),
+it is possible for another thread to add a file descriptor to the waited-upon
+.B epoll
+instance.
+If the new file descriptor becomes ready,
+it will cause the
+.BR epoll_wait ()
+call to unblock.
 .SH "SEE ALSO"
 .BR epoll_create (2),
 .BR epoll_ctl (2),