]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/aio_init.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / aio_init.3
CommitLineData
9d7a9f90
MK
1.\" Copyright (c) 2010 by Michael Kerrisk <mtk.manpages@gmail.com>
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
9d7a9f90 4.\"
4c1c5274 5.TH aio_init 3 (date) "Linux man-pages (unreleased)"
9d7a9f90 6.SH NAME
53fdc589 7aio_init \- asynchronous I/O initialization
a42212d0
AC
8.SH LIBRARY
9Real-time library
8fc3b2cf 10.RI ( librt ", " \-lrt )
9d7a9f90
MK
11.SH SYNOPSIS
12.nf
b80f966b 13.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
9d7a9f90 14.B "#include <aio.h>"
dbfe9c70 15.PP
9d7a9f90
MK
16.BI "void aio_init(const struct aioinit *" init );
17.fi
9d7a9f90
MK
18.SH DESCRIPTION
19The GNU-specific
27d47e71 20.BR aio_init ()
9d7a9f90
MK
21function allows the caller to provide tuning hints to the
22glibc POSIX AIO implementation.
23Use of this function is optional, but to be effective,
24it must be called before employing any other functions in the POSIX AIO API.
847e0d88 25.PP
9d7a9f90
MK
26The tuning information is provided in the buffer pointed to by the argument
27.IR init .
28This buffer is a structure of the following form:
29.PP
30.in +4n
b8302363 31.EX
9d7a9f90
MK
32struct aioinit {
33 int aio_threads; /* Maximum number of threads */
34 int aio_num; /* Number of expected simultaneous
35 requests */
36 int aio_locks; /* Not used */
37 int aio_usedba; /* Not used */
38 int aio_debug; /* Not used */
39 int aio_numusers; /* Not used */
40 int aio_idle_time; /* Number of seconds before idle thread
41 terminates (since glibc 2.2) */
42 int aio_reserved;
43};
b8302363 44.EE
9d7a9f90
MK
45.in
46.PP
47The following fields are used in the
48.I aioinit
49structure:
0019177e 50.TP
9d7a9f90
MK
51.I aio_threads
52This field specifies the maximum number of worker threads that
53may be used by the implementation.
54If the number of outstanding I/O operations exceeds this limit,
55then excess operations will be queued until a worker thread becomes free.
56If this field is specified with a value less than 1, the value 1 is used.
57The default value is 20.
58.TP
59.I aio_num
60This field should specify the maximum number of simultaneous I/O requests
61that the caller expects to enqueue.
62If a value less than 32 is specified for this field,
63it is rounded up to 32.
bea08fec 64.\" FIXME . But, if aio_num > 32, the behavior looks strange. See
9d7a9f90
MK
65.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12083
66The default value is 64.
67.TP
68.I aio_idle_time
69This field specifies the amount of time in seconds that a
70worker thread should wait for further requests before terminating,
71after having completed a previous request.
72The default value is 1.
73.SH VERSIONS
74The
75.BR aio_init ()
76function is available since glibc 2.1.
3113c7f3 77.SH STANDARDS
9d7a9f90
MK
78This function is a GNU extension.
79.SH SEE ALSO
80.BR aio (7)