1AIO_INIT(3)                Linux Programmer's Manual               AIO_INIT(3)
2
3
4

NAME

6       aio_init - asynchronous I/O initialization
7

SYNOPSIS

9       #define _GNU_SOURCE         /* See feature_test_macros(7) */
10       #include <aio.h>
11
12       void aio_init(const struct aioinit *init);
13
14       Link with -lrt.
15

DESCRIPTION

17       The  GNU-specific aio_init() function allows the caller to provide tun‐
18       ing hints to the glibc POSIX AIO implementation.  Use of this  function
19       is  optional,  but  to be effective, it must be called before employing
20       any other functions in the POSIX AIO API.
21
22       The tuning information is provided in the buffer pointed to by the  ar‐
23       gument init.  This buffer is a structure of the following form:
24
25           struct aioinit {
26               int aio_threads;    /* Maximum number of threads */
27               int aio_num;        /* Number of expected simultaneous
28                                      requests */
29               int aio_locks;      /* Not used */
30               int aio_usedba;     /* Not used */
31               int aio_debug;      /* Not used */
32               int aio_numusers;   /* Not used */
33               int aio_idle_time;  /* Number of seconds before idle thread
34                                      terminates (since glibc 2.2) */
35               int aio_reserved;
36           };
37
38       The following fields are used in the aioinit structure:
39
40       aio_threads
41              This  field  specifies the maximum number of worker threads that
42              may be used by the implementation.  If the number of outstanding
43              I/O  operations  exceeds this limit, then excess operations will
44              be queued until a worker thread becomes free.  If this field  is
45              specified  with  a  value less than 1, the value 1 is used.  The
46              default value is 20.
47
48       aio_num
49              This field should specify the maximum number of simultaneous I/O
50              requests  that  the  caller expects to enqueue.  If a value less
51              than 32 is specified for this field, it is  rounded  up  to  32.
52              The default value is 64.
53
54       aio_idle_time
55              This field specifies the amount of time in seconds that a worker
56              thread should wait for further requests before terminating,  af‐
57              ter  having  completed a previous request.  The default value is
58              1.
59

VERSIONS

61       The aio_init() function is available since glibc 2.1.
62

CONFORMING TO

64       This function is a GNU extension.
65

SEE ALSO

67       aio(7)
68

COLOPHON

70       This page is part of release 5.10 of the Linux  man-pages  project.   A
71       description  of  the project, information about reporting bugs, and the
72       latest    version    of    this    page,    can     be     found     at
73       https://www.kernel.org/doc/man-pages/.
74
75
76
77Linux                             2020-08-13                       AIO_INIT(3)
Impressum