2 .\" epoll by Davide Libenzi ( efficient event notification retrieval )
3 .\" Copyright (C) 2003 Davide Libenzi
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.
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.
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
19 .\" Davide Libenzi <davidel@xmailserver.org>
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 .\" 2008-10-10, mtk: add description of epoll_create1()
25 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
26 .\" all rights reserved.
27 .\" Translated Wed Jun 9 05:02:07 JST 2004
28 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
29 .\" Updated & Modified Wed Dec 29 07:12:00 JST 2004 by Yuichi SATO
30 .\" Updated & Modified Tue Apr 19 06:51:12 JST 2005 by Yuichi SATO
31 .\" Updated 2009-03-05 by Kentaro Shirakata <argrath@ub32.org>
33 .\"WORD: backing store ¥Ð¥Ã¥¥ó¥°¥¹¥È¥¢
35 .TH EPOLL_CREATE 2 2009-01-17 "Linux" "Linux Programmer's Manual"
37 epoll_create, epoll_create1 \- epoll ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥ª¡¼¥×¥ó¤¹¤ë
40 .B #include <sys/epoll.h>
42 .BI "int epoll_create(int " size );
43 .BI "int epoll_create1(int " flags );
49 ¸Ä¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÝ»ý¤Ç¤¤ëÂ礤µ¤Î¥¤¥Ù¥ó¥È¥Ð¥Ã¥¥ó¥°
50 ¥¹¥È¥¢¤Î³ä¤êÅö¤Æ¤ò¥«¡¼¥Í¥ë¤ËÂФ·¤ÆÍ׵᤹¤ë¤³¤È¤Ë¤è¤ê¡¢
51 epoll ¡Ö¥¤¥ó¥¹¥¿¥ó¥¹¡×¤òºîÀ®¤¹¤ë¡£
53 ¤Ï¥Ð¥Ã¥¥ó¥°¥¹¥È¥¢¤ÎºÇÂ祵¥¤¥º¤Ç¤Ï¤Ê¤¯¡¢
54 ÆâÉô¹½Â¤¤ÎÂ礤µ¤ò¤É¤Î°Ì¤Ë¤¹¤ë¤«¤ò¥«¡¼¥Í¥ë¤ËÃΤ餻¤ë¥Ò¥ó¥È¤Ç¤·¤«¤Ê¤¤¡£
57 ¤Ï̵»ë¤µ¤ì¤ë¡£²¼µ¤Î¡ÖÃí°Õ¡×¤ò»²¾È¡£)
60 ¤Ï¡¢¿·¤·¤¤ epoll ¥¤¥ó¥¹¥¿¥ó¥¹¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
61 ¤³¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ï¡¢¤½¤Î¸å¤Î
63 ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¸Æ¤Ó½Ð¤·¤Ë»È¤ï¤ì¤ë¡£
64 ¤â¤¦É¬ÍפǤʤ¯¤Ê¤Ã¤¿¾ì¹ç¤Ï¡¢
66 ¤ÇÊÖ¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ï
68 ¤ò»È¤Ã¤Æ¥¯¥í¡¼¥º¤µ¤ì¤ë¤Ù¤¤Ç¤¢¤ë¡£
69 ¤¢¤ë epoll ¥¤¥ó¥¹¥¿¥ó¥¹¤ò»²¾È¤¹¤ëÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬¥¯¥í¡¼¥º¤µ¤ì¤ë¤È¡¢
70 ¥«¡¼¥Í¥ë¤Ï¤½¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÇ˲õ¤·¤Æ¡¢Âбþ¤¹¤ë¥ê¥½¡¼¥¹¤ò²òÊü¤·¡¢
71 ºÆ»ÈÍѤǤ¤ë¤è¤¦¤Ë¤¹¤ë¡£
76 ¤¬ 0 ¤Î¾ì¹ç¡¢¸½ºß¤Ç¤Ï»È¤ï¤ì¤Æ¤¤¤Ê¤¤
78 °ú¤¿ô¤¬¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤ëÅÀ¤ò½ü¤±¤Ð
82 ¤Ë°Ê²¼¤ÎÃͤò¥Ó¥Ã¥ÈËè¤ÎÏÀÍýÏ (OR) ¤Ç»ØÄꤹ¤ë¤³¤È¤Ç¡¢
83 °Û¤Ê¤ëÆ°ºî¤ò¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£
86 ¿·¤·¤¤¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ËÂФ·¤Æ
90 ¤³¤Î¥Õ¥é¥°¤¬Ìò¤ËΩ¤ÄÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
94 ¥Õ¥é¥°¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
96 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
97 ÈóÉé¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
98 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
100 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
108 .RB ( epoll_create1 ())
110 ¤Ë̵¸ú¤ÊÃͤ¬»ØÄꤵ¤ì¤¿¡£
113 .I /proc/sys/fs/epoll/max_user_instances
114 ¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤Æ¤¤¤ë¡¢epoll ¥¤¥ó¥¹¥¿¥ó¥¹¤Î¥æ¡¼¥¶¡¼Ã±°Ì¤ÎÀ©¸Â¤Ë㤷¤¿¡£
120 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÎÁí¿ô¤¬¥·¥¹¥Æ¥àÀ©¸Â¤Ë㤷¤¿¡£
123 ¥«¡¼¥Í¥ë¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤¹¤ë¤Î¤Ë½½Ê¬¤Ê¥á¥â¥ê¤¬¤Ê¤«¤Ã¤¿¡£
126 ¤Ï Linux Æȼ«¤Ç¤¢¤ê¡¢¥«¡¼¥Í¥ë 2.5.44 ¤ÇƳÆþ¤µ¤ì¤¿¡£
127 .\" ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï Linux ¥«¡¼¥Í¥ë 2.5.66 ¤Ç³ÎÄꤵ¤ì¤ë¤Ù¤¤Ç¤¢¤ë¡£
129 Linux 2.6.8 °Ê¹ß¤Ç¤Ï¡¢
132 (¥«¡¼¥Í¥ë¤Ï¡¢Æ°Åª¤ËɬÍפʥǡ¼¥¿¹½Â¤¤ÎÂ礤µ¤ò·èÄꤷ¡¢
133 ºÇ½é¤Î¥Ò¥ó¥È¤òɬÍפ·¤Ê¤¤)¡£