]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" |
2 | .\" epoll by Davide Libenzi ( efficient event notification retrieval ) | |
3 | .\" Copyright (C) 2003 Davide Libenzi | |
4 | .\" | |
5 | .\" This program is free software; you can redistribute it and/or modify | |
6 | .\" it under the terms of the GNU General Public License as published by | |
7 | .\" the Free Software Foundation; either version 2 of the License, or | |
8 | .\" (at your option) any later version. | |
9 | .\" | |
10 | .\" This program is distributed in the hope that it will be useful, | |
11 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | .\" GNU General Public License for more details. | |
14 | .\" | |
15 | .\" You should have received a copy of the GNU General Public License | |
16 | .\" along with this program; if not, write to the Free Software | |
17 | .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | .\" | |
19 | .\" Davide Libenzi <davidel@xmailserver.org> | |
20 | .\" | |
305a0578 | 21 | .\" Modified 2004-06-17 by Michael Kerrisk <mtk-manpages@gmx.net> |
3d9a2200 | 22 | .\" Modified 2005-04-04 by Marko Kohtala <marko.kohtala@gmail.com> |
fea681da MK |
23 | .\" |
24 | .TH EPOLL_CREATE 2 "2004-06-17" "Linux 2.6.7" "Linux Programmer's Manual" | |
25 | .SH NAME | |
26 | epoll_create \- open an epoll file descriptor | |
27 | .SH SYNOPSIS | |
28 | .B #include <sys/epoll.h> | |
29 | .sp | |
6e126ed6 | 30 | .BI "int epoll_create(int " size ) |
fea681da MK |
31 | .SH DESCRIPTION |
32 | Open an | |
33 | .B epoll | |
34 | file descriptor by requesting the kernel allocate | |
35 | an event backing store dimensioned for | |
36 | .I size | |
37 | descriptors. The | |
38 | .I size | |
39 | is not the maximum size of the backing store but | |
40 | just a hint to the kernel about how to dimension internal structures. | |
41 | The returned file descriptor will be used for all the subsequent calls to the | |
42 | .B epoll | |
43 | interface. The file descriptor returned by | |
44 | .BR epoll_create (2) | |
45 | must be closed by using | |
46 | .BR close (2). | |
47 | .SH "RETURN VALUE" | |
48 | When successful, | |
49 | .BR epoll_create (2) | |
b97a9222 | 50 | returns a non-negative integer identifying the descriptor. |
fea681da MK |
51 | When an error occurs, |
52 | .BR epoll_create (2) | |
8729177b | 53 | returns \-1 and |
fea681da MK |
54 | .I errno |
55 | is set appropriately. | |
56 | .SH ERRORS | |
57 | .TP | |
3d9a2200 MK |
58 | .B EINVAL |
59 | .I size | |
60 | is not positive. | |
61 | .TP | |
62 | .TP | |
fea681da MK |
63 | .B ENFILE |
64 | The system limit on the total number of open files has been reached. | |
65 | .TP | |
66 | .B ENOMEM | |
67 | There was insufficient memory to create the kernel object. | |
68 | .SH CONFORMING TO | |
69 | .BR epoll_create (2) | |
70 | is a new API introduced in Linux kernel 2.5.44. | |
71 | The interface should be finalized by Linux kernel 2.5.66. | |
72 | .SH "SEE ALSO" | |
73 | .BR close (2), | |
74 | .BR epoll_ctl (2), | |
75 | .BR epoll_wait (2), | |
76 | .BR epoll (4) |