1 .\" Copyright (c) 2010 by Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH aio_init 3 (date) "Linux man-pages (unreleased)"
7 aio_init \- asynchronous I/O initialization
10 .RI ( librt ", " \-lrt )
13 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
16 .BI "void aio_init(const struct aioinit *" init );
21 function allows the caller to provide tuning hints to the
22 glibc POSIX AIO implementation.
23 Use of this function is optional, but to be effective,
24 it must be called before employing any other functions in the POSIX AIO API.
26 The tuning information is provided in the buffer pointed to by the argument
28 This buffer is a structure of the following form:
33 int aio_threads; /* Maximum number of threads */
34 int aio_num; /* Number of expected simultaneous
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) */
47 The following fields are used in the
52 This field specifies the maximum number of worker threads that
53 may be used by the implementation.
54 If the number of outstanding I/O operations exceeds this limit,
55 then excess operations will be queued until a worker thread becomes free.
56 If this field is specified with a value less than 1, the value 1 is used.
57 The default value is 20.
60 This field should specify the maximum number of simultaneous I/O requests
61 that the caller expects to enqueue.
62 If a value less than 32 is specified for this field,
63 it is rounded up to 32.
64 .\" FIXME . But, if aio_num > 32, the behavior looks strange. See
65 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=12083
66 The default value is 64.
69 This field specifies the amount of time in seconds that a
70 worker thread should wait for further requests before terminating,
71 after having completed a previous request.
72 The default value is 1.