source: trunk/packages/xen-3.1/xen-3.1/tools/libaio/man/aio_init.3 @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 2.4 KB
Line 
1.TH  aio_init 3 2002-09-12 "Linux 2.4" Linux AIO"
2.SH NAME
3aio_init \-  How to optimize the AIO implementation
4.SH SYNOPSYS
5.nf
6.B #include <errno.h>
7.sp
8.br
9.B #include <aio.h>
10.sp
11.br
12.BI "void aio_init (const struct aioinit *init)"
13.fi
14.SH DESCRIPTION
15
16The POSIX standard does not specify how the AIO functions are
17implemented.  They could be system calls, but it is also possible to
18emulate them at userlevel.
19
20At the point of this writing, the available implementation is a userlevel
21implementation which uses threads for handling the enqueued requests.
22While this implementation requires making some decisions about
23limitations, hard limitations are something which is best avoided
24in the GNU C library.  Therefore, the GNU C library provides a means
25for tuning the AIO implementation according to the individual use.
26
27.BI "struct aioinit"
28.PP
29This data type is used to pass the configuration or tunable parameters
30to the implementation.  The program has to initialize the members of
31this struct and pass it to the implementation using the
32.IR aio_init
33function.
34.TP
35.B "int aio_threads"
36This member specifies the maximal number of threads which may be used
37at any one time.
38.TP
39.B "int aio_num"
40This number provides an estimate on the maximal number of simultaneously
41enqueued requests.
42.TP
43.B "int aio_locks"
44Unused.
45.TP
46.B "int aio_usedba"
47Unused.
48.TP
49.B "int aio_debug"
50Unused.
51.TP
52.B "int aio_numusers"
53Unused.
54.TP
55.B "int aio_reserved[2]"
56Unused.
57.PP
58This function must be called before any other AIO function.  Calling it
59is completely voluntary, as it is only meant to help the AIO
60implementation perform better.
61
62Before calling the
63.IR aio_init
64, function the members of a variable of
65type
66.IR "struct aioinit"
67must be initialized.  Then a reference to
68this variable is passed as the parameter to
69.IR aio_init
70which itself
71may or may not pay attention to the hints.
72
73It is a extension which follows a proposal from the SGI implementation in
74.IR Irix 6
75.  It is not covered by POSIX.1b or Unix98.
76.SH "RETURN VALUES"
77The function has no return value.
78.SH ERRORS
79The function has no error cases defined.
80.SH "SEE ALSO"
81.BR aio(3),
82.BR aio_cancel(3),
83.BR aio_cancel64(3),
84.BR aio_error(3),
85.BR aio_error64(3),
86.BR aio_fsync(3),
87.BR aio_fsync64(3),
88.BR aio_read(3),
89.BR aio_read64(3),
90.BR aio_return(3),
91.BR aio_return64(3),
92.BR aio_suspend(3),
93.BR aio_suspend64(3),
94.BR aio_write(3),
95.BR aio_write64(3),
96.BR errno(3),
Note: See TracBrowser for help on using the repository browser.