• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/api_reference/C/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DB_ENV-&gt;set_mp_max_write()</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10    <link rel="up" href="memp.html" title="Chapter��8.�� The DB_MPOOLFILE Handle" />
11    <link rel="prev" href="mempset_mp_max_openfd.html" title="DB_ENV-&gt;set_mp_max_openfd()" />
12    <link rel="next" href="envset_mp_mmapsize.html" title="DB_ENV-&gt;set_mp_mmapsize()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;set_mp_max_write()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="mempset_mp_max_openfd.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��8.��
23              The  DB_MPOOLFILE Handle
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="envset_mp_mmapsize.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="mempset_mp_max_write"></a>DB_ENV-&gt;set_mp_max_write()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;set_mp_max_write(DB_ENV *env, int maxwrite, db_timeout_t maxwrite_sleep);  </pre>
42      <p>
43         The <code class="methodname">DB_ENV-&gt;set_mp_max_write()</code> method limits the number of sequential
44         write operations scheduled by the library when flushing dirty pages
45         from the cache.
46    </p>
47      <p>
48         The database environment's maximum number of sequential write
49         operations may also be configured using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file.  The
50         syntax of the entry in that file is a single line with the string
51         "set_mp_max_write", one or more whitespace characters, and the maximum
52         number of sequential writes and the number of microseconds to sleep,
53         also separated by whitespace characters. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is
54         read when the database environment is opened, it will silently
55         overrule configuration done before that time.
56    </p>
57      <p>
58         The <code class="methodname">DB_ENV-&gt;set_mp_max_write()</code> method configures a database
59         environment, not only operations performed using the specified 
60         <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  handle.
61    </p>
62      <p>
63         The <code class="methodname">DB_ENV-&gt;set_mp_max_write()</code> <span>
64            <span>
65                  method returns a non-zero error value on failure and 0 on success.
66            </span>
67            
68        </span>
69    </p>
70      <div class="sect2" lang="en" xml:lang="en">
71        <div class="titlepage">
72          <div>
73            <div>
74              <h3 class="title"><a id="id1688573"></a>Parameters</h3>
75            </div>
76          </div>
77        </div>
78        <div class="sect3" lang="en" xml:lang="en">
79          <div class="titlepage">
80            <div>
81              <div>
82                <h4 class="title"><a id="id1688741"></a>maxwrite</h4>
83              </div>
84            </div>
85          </div>
86          <p>
87                          The maximum number of sequential write operations scheduled by the
88                          library when flushing dirty pages from the cache, or 0 if there is no
89                          limitation on the number of sequential write operations.
90                     </p>
91        </div>
92        <div class="sect3" lang="en" xml:lang="en">
93          <div class="titlepage">
94            <div>
95              <div>
96                <h4 class="title"><a id="id1688973"></a>maxwrite_sleep</h4>
97              </div>
98            </div>
99          </div>
100          <p>
101                          The number of microseconds the thread of control should pause before
102                          scheduling further write operations.  It must be specified as an
103                          unsigned 32-bit number of microseconds, limiting the maximum pause to
104                          roughly 71 minutes.
105                     </p>
106        </div>
107      </div>
108      <div class="sect2" lang="en" xml:lang="en">
109        <div class="titlepage">
110          <div>
111            <div>
112              <h3 class="title"><a id="id1688855"></a>Errors</h3>
113            </div>
114          </div>
115        </div>
116        <p>
117                         The <code class="methodname">DB_ENV-&gt;set_mp_max_write()</code> <span>
118            <span>
119                 method may fail and return one of the following non-zero errors:
120            </span>
121            
122        </span>
123                    </p>
124        <div class="sect3" lang="en" xml:lang="en">
125          <div class="titlepage">
126            <div>
127              <div>
128                <h4 class="title"><a id="id1688945"></a>EINVAL</h4>
129              </div>
130            </div>
131          </div>
132          <p>
133                An invalid flag value or parameter was specified.
134            </p>
135        </div>
136      </div>
137      <div class="sect2" lang="en" xml:lang="en">
138        <div class="titlepage">
139          <div>
140            <div>
141              <h3 class="title"><a id="id1689013"></a>Class</h3>
142            </div>
143          </div>
144        </div>
145        <p>
146                 <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>, <a class="link" href="memp.html" title="Chapter��8.�� The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> 
147            </p>
148      </div>
149      <div class="sect2" lang="en" xml:lang="en">
150        <div class="titlepage">
151          <div>
152            <div>
153              <h3 class="title"><a id="id1689017"></a>See Also</h3>
154            </div>
155          </div>
156        </div>
157        <p>
158                     <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a> 
159                </p>
160      </div>
161    </div>
162    <div class="navfooter">
163      <hr />
164      <table width="100%" summary="Navigation footer">
165        <tr>
166          <td width="40%" align="left"><a accesskey="p" href="mempset_mp_max_openfd.html">Prev</a>��</td>
167          <td width="20%" align="center">
168            <a accesskey="u" href="memp.html">Up</a>
169          </td>
170          <td width="40%" align="right">��<a accesskey="n" href="envset_mp_mmapsize.html">Next</a></td>
171        </tr>
172        <tr>
173          <td width="40%" align="left" valign="top">DB_ENV-&gt;set_mp_max_openfd()��</td>
174          <td width="20%" align="center">
175            <a accesskey="h" href="index.html">Home</a>
176          </td>
177          <td width="40%" align="right" valign="top">��DB_ENV-&gt;set_mp_mmapsize()</td>
178        </tr>
179      </table>
180    </div>
181  </body>
182</html>
183