]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/epoll_create.2
Update timestamp
[thirdparty/man-pages.git] / man2 / epoll_create.2
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 .\"
21 .\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
22 .\" Modified 2005-04-04 by Marko Kohtala <marko.kohtala@gmail.com>
23 .\"
24 .TH EPOLL_CREATE 2 2008-05-29 "Linux" "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
30 .BI "int epoll_create(int " size );
31 .SH DESCRIPTION
32 Open an
33 .B epoll
34 file descriptor by requesting the kernel to allocate
35 an event backing store dimensioned for
36 .I size
37 descriptors.
38 The
39 .I size
40 is not the maximum size of the backing store but
41 just a hint to the kernel about how to dimension internal structures.
42 The returned file descriptor will be used for all the subsequent calls to the
43 .B epoll
44 interface.
45 The file descriptor returned by
46 .BR epoll_create ()
47 must be closed by using
48 .BR close (2).
49 .SH "RETURN VALUE"
50 When successful,
51 .BR epoll_create ()
52 returns a non-negative integer identifying the descriptor.
53 When an error occurs,
54 .BR epoll_create ()
55 returns \-1 and
56 .I errno
57 is set appropriately.
58 .SH ERRORS
59 .TP
60 .B EINVAL
61 .I size
62 is not positive.
63 .TP
64 .B ENFILE
65 The system limit on the total number of open files has been reached.
66 .TP
67 .B ENOMEM
68 There was insufficient memory to create the kernel object.
69 .SH CONFORMING TO
70 .BR epoll_create ()
71 is Linux-specific, and was introduced in kernel 2.5.44.
72 .\" The interface should be finalized by Linux kernel 2.5.66.
73 .SH NOTES
74 Since Linux 2.6.8, the
75 .I size
76 argument is unused.
77 .SH "SEE ALSO"
78 .BR close (2),
79 .BR epoll_ctl (2),
80 .BR epoll_wait (2),
81 .BR epoll (7)