1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
5 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI, all rights reserved.
6 .\" Translated Mon Mar 8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
8 .\" .de Sh \" Subsection
16 .\" .de Sp \" Vertical space (when we can't use .PP)
20 .\" .de Ip \" List item
22 .\" .ie \\n(.$>=3 .ne \\$3
26 .TH IO_SETUP 2 2003-06-18 "Linux" "Linux Programmer's Manual"
28 io_setup \- ÈóƱ´ü I/O ¥³¥ó¥Æ¥¥¹¥È¤òºîÀ®¤¹¤ë
33 .B #include <libaio.h>
34 .\" #include <linux/aio.h>
37 .BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctxp );
41 \fI\-laio\fP ¤È¥ê¥ó¥¯¤¹¤ë¡£
46 ¤Ï¡¢¾¯¤Ê¤¯¤È¤â \fInr_events\fP ¸Ä¤Î¥¤¥Ù¥ó¥È¤ò¼õ¿®²Äǽ¤Ê
47 ÈóƱ´ü I/O (AIO) ¥³¥ó¥Æ¥¥¹¥È¤ÎºîÀ®¤ò¹Ô¤¦¡£
48 \fIctxp\fP ¤Ï¡¢¤¹¤Ç¤Ë¸ºß¤¹¤ë AIO ¥³¥ó¥Æ¥¥¹¥È¤ò»Ø¤·¤Æ¤¤¤Æ¤Ï¤Ê¤é¤º¡¢
50 ¤Î¸Æ¤Ó½Ð¤·¤ÎÁ°¤Ë 0 ¤Ë½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
51 AIO ¥³¥ó¥Æ¥¥¹¥È¤ÎºîÀ®¤ËÀ®¸ù¤¹¤ë¤È¡¢\fI*ctxp\fP ¤ËºîÀ®¤µ¤ì¤¿
52 AIO ¥³¥ó¥Æ¥¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
57 ¼ºÇÔ»þ¤ÎÊÖ¤êÃͤˤĤ¤¤Æ¤Ï¡¢¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¤¹¤ë¤³¤È¡£
61 »ØÄꤵ¤ì¤¿ \fInr_events\fP ¤¬¥æ¡¼¥¶¤¬»ÈÍѤǤ¤ë¥¤¥Ù¥ó¥È¿ô¤Î¾å¸Â¤ò±Û¤¨¤Æ¤¤¤ë¡£
64 \fIctxp\fP ¤Ë̵¸ú¤Ê¥Ý¥¤¥ó¥¿¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¡£
67 \fIctxp\fP ¤¬½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢»ØÄꤵ¤ì¤¿ \fInr_events\fP ¤¬
68 ÆâÉô¤ÎÀ©¸ÂÃͤò±Û¤¨¤Æ¤¤¤ë¡£¤Þ¤¿¡¢ \fInr_events\fP ¤Ï 0 ¤è¤êÂ礤¤ÃͤË
72 ɬÍפʥ«¡¼¥Í¥ë¡¦¥ê¥½¡¼¥¹¤òÆÀ¤é¤ì¤Ê¤¤¡£
76 ¤¬¤³¤Î¥¢¡¼¥¥Æ¥¯¥Á¥ã¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
79 ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï 2002ǯ8·î¤Ë Linux 2.5 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
83 ¤Ï Linux ¸ÇͤǤ¢¤ê¡¢°Ü¿¢¤òÁÛÄꤷ¤¿¥×¥í¥°¥é¥à¤Ç
86 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ëÍѤΥé¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
91 ÍѤËÄ󶡤µ¤ì¤Æ¤¤¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤ÎÄÌÃΤ¬Ä̾ï¤Î C ¥é¥¤¥Ö¥é¥ê¤Î
92 ´·½¬¤Ë¤·¤¿¤¬¤Ã¤Æ¤ª¤é¤º¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤ÏÉé¤Î¥¨¥é¡¼ÈÖ¹æ
93 (¥¨¥é¡¼¤ÎÀá¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÃͤΰì¤Ä¤òÉé¤Ë¤·¤¿¤â¤Î) ¤¬ÊÖ¤êÃͤȤʤ롣
95 ·Ðͳ¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤¹¤ë¤È¡¢ÊÖ¤êÃͤÏÄ̾ï¤Î¥¨¥é¡¼ÄÌÃΤδ·½¬¤Ë
96 ¤·¤¿¤¬¤Ã¤Æ¤â¤Î¤È¤Ê¤ê¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤¬Ê֤ꡢ
98 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ (Àµ¤Î) Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
103 .BR io_getevents (2),
108 .\" ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Benjamin LaHaise ¤¬½ñ¤¤¤¿¡£