Print this page
11622 clean up rarer mandoc lint warnings
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/epoll_wait.3c
+++ new/usr/src/man/man3c/epoll_wait.3c
1 1 '\" te
2 2 .\" Copyright (c) 2014, Joyent, Inc. All Rights Reserved.
3 3 .\" This file and its contents are supplied under the terms of the
4 4 .\" Common Development and Distribution License ("CDDL"), version 1.0.
5 5 .\" You may only use this file in accordance with the terms of version
6 6 .\" 1.0 of the CDDL.
7 -.\"
7 +.\"
8 8 .\" A full copy of the text of the CDDL should have accompanied this
9 9 .\" source. A copy of the CDDL is also available via the Internet at
10 10 .\" http://www.illumos.org/license/CDDL.
11 11 .TH EPOLL_WAIT 3C "Apr 17, 2014"
12 12 .SH NAME
13 13 epoll_wait, epoll_pwait \- wait for epoll events
14 14 .SH SYNOPSIS
15 -
16 -.LP
17 15 .nf
18 16 #include <sys/epoll.h>
19 17
20 -\fBint\fR \fBepoll_wait\fR(\fBint\fR \fIepfd\fR, \fBstruct epoll_event *\fR\fIevents\fR,
18 +\fBint\fR \fBepoll_wait\fR(\fBint\fR \fIepfd\fR, \fBstruct epoll_event *\fR\fIevents\fR,
21 19 \fBint\fR \fImaxevents\fR, \fBint\fR \fItimeout\fR);
22 20 .fi
23 21
24 22 .LP
25 23 .nf
26 -\fBint\fR \fBepoll_pwait\fR(\fBint\fR \fIepfd\fR, \fBstruct epoll_event *\fR\fIevents\fR,
24 +\fBint\fR \fBepoll_pwait\fR(\fBint\fR \fIepfd\fR, \fBstruct epoll_event *\fR\fIevents\fR,
27 25 \fBint\fR \fImaxevents\fR, \fBint\fR \fItimeout\fR,
28 26 \fBconst sigset_t *\fR\fIsigmask\fR);
29 27 .fi
30 28
31 29 .SH DESCRIPTION
32 -.LP
33 30 The \fBepoll_wait()\fR function waits for events on the \fBepoll\fR(5)
34 31 instance specified by \fIepfd\fR. The \fIevents\fR parameter must point to
35 32 an array of \fImaxevents\fR \fIepoll_event\fR structures to be
36 33 filled in with pending events. The \fItimeout\fR argument specifies the
37 34 number of milliseconds to wait for an event if none is pending. A
38 35 \fItimeout\fR of -1 denotes an infinite timeout.
39 36
40 37 The \fBepoll_pwait()\fR is similar to \fBepoll_wait()\fR, but takes an
41 38 additional \fIsigmask\fR argument that specifies the desired signal mask
42 39 when \fBepoll_pwait()\fR is blocked. It is equivalent to atomically
43 40 setting the signal mask, calling \fBepoll_wait()\fR, and restoring the
44 41 signal mask upon return, and is therefore similar to the relationship
45 42 between \fBselect\fR(3C) and \fBpselect\fR(3C).
46 43
47 44 .SH RETURN VALUES
48 -.LP
49 45 Upon successful completion, \fBepoll_wait()\fR and \fBepoll_pwait()\fR return
50 46 the number of events, or 0 if none was pending and \fItimeout\fR milliseconds
51 47 elapsed. If an error occurs, -1 is returned and errno is set to indicate
52 48 the error.
53 49
54 50 .SH ERRORS
55 -.LP
56 51 The \fBepoll_wait()\fR and \fBepoll_pwait()\fR functions will fail if:
57 52 .sp
58 53 .ne 2
59 54 .na
60 55 \fB\fBEBADF\fR\fR
61 56 .ad
62 57 .RS 10n
63 58 \fIepfd\fR is not a valid file descriptor.
64 59 .RE
65 60
66 61 .sp
67 62 .ne 2
68 63 .na
69 64 \fB\fBEFAULT\fR\fR
70 65 .ad
71 66 .RS 10n
72 67 The memory associated with \fIevents\fR was not mapped or was not writable.
73 68 .RE
74 69
75 70 .sp
76 71 .ne 2
77 72 .na
78 73 \fB\fBEINTR\fR\fR
79 74 .ad
80 75 .RS 10n
81 76 A signal was received during the \fBepoll_wait()\fR or \fBepoll_pwait()\fR.
82 77 .RE
83 78
84 79 .sp
85 80 .ne 2
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
86 81 .na
87 82 \fB\fBEINVAL\fR\fR
88 83 .ad
89 84 .RS 10n
90 85 Either \fIepfd\fR is not a valid \fBepoll\fR(5) instance or \fImaxevents\fR
91 86 is not greater than zero.
92 87 .RE
93 88
94 89 .sp
95 90 .SH NOTES
96 -.LP
97 -
98 91 The \fBepoll\fR(5) facility is implemented for purposes of offering
99 92 compatibility for Linux-borne applications; native
100 93 applications should continue to prefer using event ports via the
101 94 \fBport_create\fR(3C), \fBport_associate\fR(3C) and \fBport_get\fR(3C)
102 95 interfaces. See \fBepoll\fR(5) for compatibility details and restrictions.
103 96
104 97 .SH SEE ALSO
105 -.LP
106 98 \fBepoll_create\fR(3C), \fBepoll_ctl\fR(3C),
107 99 \fBport_create\fR(3C), \fBport_associate\fR(3C), \fBport_get\fR(3C),
108 100 \fBpselect\fR(3C), \fBepoll\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX