142 lines
4.5 KiB
HTML
142 lines
4.5 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of AIO_INIT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>AIO_INIT</H1>
|
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
aio_init - asynchronous I/O initialization
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<PRE>
|
|
<B>#define _GNU_SOURCE</B> /* See <A HREF="/cgi-bin/man/man2html?7+feature_test_macros">feature_test_macros</A>(7) */
|
|
<B>#include <<A HREF="file:///usr/include/aio.h">aio.h</A>></B>
|
|
|
|
<B>void aio_init(const struct aioinit *</B><I>init</I><B>);</B>
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
Link with <I>-lrt</I>.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The GNU-specific
|
|
<B>aio_init</B>()
|
|
|
|
function allows the caller to provide tuning hints to the
|
|
glibc POSIX AIO implementation.
|
|
Use of this function is optional, but to be effective,
|
|
it must be called before employing any other functions in the POSIX AIO API.
|
|
<P>
|
|
|
|
The tuning information is provided in the buffer pointed to by the argument
|
|
<I>init</I>.
|
|
|
|
This buffer is a structure of the following form:
|
|
<P>
|
|
|
|
|
|
|
|
struct aioinit {
|
|
<BR> int aio_threads; /* Maximum number of threads */
|
|
<BR> int aio_num; /* Number of expected simultaneous
|
|
<BR> requests */
|
|
<BR> int aio_locks; /* Not used */
|
|
<BR> int aio_usedba; /* Not used */
|
|
<BR> int aio_debug; /* Not used */
|
|
<BR> int aio_numusers; /* Not used */
|
|
<BR> int aio_idle_time; /* Number of seconds before idle thread
|
|
<BR> terminates (since glibc 2.2) */
|
|
<BR> int aio_reserved;
|
|
};
|
|
|
|
|
|
<P>
|
|
|
|
The following fields are used in the
|
|
<I>aioinit</I>
|
|
|
|
structure:
|
|
<DL COMPACT>
|
|
<DT id="1"><I>aio_threads</I>
|
|
|
|
<DD>
|
|
This field specifies the maximum number of worker threads that
|
|
may be used by the implementation.
|
|
If the number of outstanding I/O operations exceeds this limit,
|
|
then excess operations will be queued until a worker thread becomes free.
|
|
If this field is specified with a value less than 1, the value 1 is used.
|
|
The default value is 20.
|
|
<DT id="2"><I>aio_num</I>
|
|
|
|
<DD>
|
|
This field should specify the maximum number of simultaneous I/O requests
|
|
that the caller expects to enqueue.
|
|
If a value less than 32 is specified for this field,
|
|
it is rounded up to 32.
|
|
|
|
|
|
The default value is 64.
|
|
<DT id="3"><I>aio_idle_time</I>
|
|
|
|
<DD>
|
|
This field specifies the amount of time in seconds that a
|
|
worker thread should wait for further requests before terminating,
|
|
after having completed a previous request.
|
|
The default value is 1.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
The
|
|
<B>aio_init</B>()
|
|
|
|
function is available since glibc 2.1.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
This function is a GNU extension.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+aio">aio</A></B>(7)
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="5"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="6"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAE">VERSIONS</A><DD>
|
|
<DT id="8"><A HREF="#lbAF">CONFORMING TO</A><DD>
|
|
<DT id="9"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="10"><A HREF="#lbAH">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:35 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|