1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="sd-readahead" conditional='ENABLE_READAHEAD'>
27 <title>sd-readahead</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>sd-readahead</refentrytitle>
42 <manvolnum>3</manvolnum>
46 <refname>sd-readahead</refname>
47 <refpurpose>Reference implementation of APIs for
48 controlling boot-time read-ahead</refpurpose>
53 <funcsynopsisinfo>#include "sd-readahead.h"</funcsynopsisinfo>
58 <title>Description</title>
60 <para><filename>sd-readahead.c</filename> and
61 <filename>sd-readahead.h</filename> provide a
62 reference implementation for APIs for controlling boot-time
63 read-ahead, as implemented by the read-ahead subsystem
65 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
69 <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>
70 for more information about the function
77 <para>This interface is provided by the reference
78 implementation of APIs for controlling boot-time
79 read-ahead and distributed with the systemd
80 package. The algorithms it implements are simple, and
81 can easily be reimplemented in daemons if it is
82 important to support this interface without using the
83 reference implementation. See the respective function
84 man pages for details.</para>
86 <para>In addition, for details about the algorithms
87 check the liberally licensed reference implementation
89 <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c"/>
90 and <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h"/></para>
92 <para>These APIs are implemented in the reference
93 implementation's drop-in
94 <filename>sd-readahead.c</filename> and
95 <filename>sd-readahead.h</filename> files. It is
96 recommended that applications consuming these APIs copy
97 the implementation into their source tree, either
98 verbatim or in excerpts. These interfaces are
99 currently not available in a dynamic library.</para>
101 <para>The functions provided by this interface become
102 NOPs when -DDISABLE_SYSTEMD is set during
103 compilation. In addition, if
104 <filename>sd-readhead.c</filename> is compiled on
105 non-Linux systems it becomes NOPs.</para>
109 <title>See Also</title>
111 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>