1aio_init(3)                Library Functions Manual                aio_init(3)
2
3
4

NAME

6       aio_init - asynchronous I/O initialization
7

LIBRARY

9       Real-time library (librt, -lrt)
10

SYNOPSIS

12       #define _GNU_SOURCE         /* See feature_test_macros(7) */
13       #include <aio.h>
14
15       void aio_init(const struct aioinit *init);
16

DESCRIPTION

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

STANDARDS

62       GNU.
63

HISTORY

65       glibc 2.1.
66

SEE ALSO

68       aio(7)
69
70
71
72Linux man-pages 6.04              2023-03-30                       aio_init(3)
Impressum