From 23a169f74984168894b36864dd53a12be625d435 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 19 Feb 2020 09:22:38 +0100 Subject: [PATCH] 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 --- man2/epoll_wait.2 | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2 index cf6e6dbe0..81ffe2f06 100644 --- a/man2/epoll_wait.2 +++ b/man2/epoll_wait.2 @@ -1,5 +1,6 @@ .\" Copyright (C) 2003 Davide Libenzi .\" Davide Libenzi +.\" and Copyright 2007, 2012, 2014, 2018 Michael Kerrisk .\" .\" %%%LICENSE_START(GPLv2+_SW_3_PARA) .\" 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) instance referred to by the file descriptor .IR epfd . -The memory area pointed to by +The buffer pointed to by .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 .I maxevents are returned by @@ -58,12 +61,15 @@ will block. Time is measured against the .B CLOCK_MONOTONIC clock. -The call will block until either: -.IP * 3 +.PP +A call to +.BR epoll_wait () +will block until either: +.IP \(bu 2 a file descriptor delivers an event; -.IP * +.IP \(bu the call is interrupted by a signal handler; or -.IP * +.IP \(bu the timeout expires. .PP Note that the @@ -103,14 +109,22 @@ struct epoll_event { .PP The .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 .BR epoll_ctl (2) .RB ( EPOLL_CTL_ADD ", " EPOLL_CTL_MOD ) -for the corresponding open file description. +for the corresponding open file descriptor. +.PP The .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() The relationship between .BR epoll_wait ()