• 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;mutex_set_tas_spins()</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="mutex.html" title="Chapter��9.�� Mutex Methods" />
11    <link rel="prev" href="mutexset_max.html" title="DB_ENV-&gt;mutex_set_max()" />
12    <link rel="next" href="mutexstat.html" title="DB_ENV-&gt;mutex_stat()" />
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;mutex_set_tas_spins()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="mutexset_max.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��9.��
23                Mutex Methods 
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="mutexstat.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="mutexset_tas_spins"></a>DB_ENV-&gt;mutex_set_tas_spins()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;mutex_set_tas_spins(DB_ENV *dbenv, u_int32_t tas_spins);  </pre>
42      <p>
43         Specify that test-and-set mutexes should spin <span class="bold"><strong>tas_spins</strong></span> times without blocking.  The value
44         defaults to 1 on uniprocessor systems and to 50 times the number of
45         processors on multiprocessor systems.
46    </p>
47      <p>
48         The database environment's test-and-set spin count may also be
49         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_tas_spins", one or more whitespace characters, and the number of
52         spins. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is
53         read when the database environment is opened, it will silently
54         overrule configuration done before that time.
55    </p>
56      <p>
57         The <code class="methodname">DB_ENV-&gt;mutex_set_tas_spins()</code> method configures operations
58         performed using the specified 
59         <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  handle, not all
60         operations performed on the underlying database environment.
61    </p>
62      <p>
63         The <code class="methodname">DB_ENV-&gt;mutex_set_tas_spins()</code> method may be called at any time
64         during the life of the application.
65    </p>
66      <p>
67         The <code class="methodname">DB_ENV-&gt;mutex_set_tas_spins()</code> <span>
68            <span>
69                  method returns a non-zero error value on failure and 0 on success.
70            </span>
71            
72        </span>
73    </p>
74      <div class="sect2" lang="en" xml:lang="en">
75        <div class="titlepage">
76          <div>
77            <div>
78              <h3 class="title"><a id="id1695310"></a>Parameters</h3>
79            </div>
80          </div>
81        </div>
82        <div class="sect3" lang="en" xml:lang="en">
83          <div class="titlepage">
84            <div>
85              <div>
86                <h4 class="title"><a id="id1695244"></a>tas_spins</h4>
87              </div>
88            </div>
89          </div>
90          <p>
91                          The <span class="bold"><strong>tas_spins</strong></span> parameter is the number
92                          of spins test-and-set mutexes should execute before blocking.
93                     </p>
94        </div>
95      </div>
96      <div class="sect2" lang="en" xml:lang="en">
97        <div class="titlepage">
98          <div>
99            <div>
100              <h3 class="title"><a id="id1694816"></a>Errors</h3>
101            </div>
102          </div>
103        </div>
104        <p>
105                         The <code class="methodname">DB_ENV-&gt;mutex_set_tas_spins()</code> <span>
106            <span>
107                 method may fail and return one of the following non-zero errors:
108            </span>
109            
110        </span>
111                    </p>
112        <div class="sect3" lang="en" xml:lang="en">
113          <div class="titlepage">
114            <div>
115              <div>
116                <h4 class="title"><a id="id1695335"></a>EINVAL</h4>
117              </div>
118            </div>
119          </div>
120          <p>
121                An invalid flag value or parameter was specified.
122            </p>
123        </div>
124      </div>
125      <div class="sect2" lang="en" xml:lang="en">
126        <div class="titlepage">
127          <div>
128            <div>
129              <h3 class="title"><a id="id1695341"></a>Class</h3>
130            </div>
131          </div>
132        </div>
133        <p>
134                <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  
135            </p>
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="id1695299"></a>See Also</h3>
142            </div>
143          </div>
144        </div>
145        <p>
146                     <a class="xref" href="mutex.html#mutexlist" title="Mutex Methods">Mutex Methods</a> 
147                </p>
148      </div>
149    </div>
150    <div class="navfooter">
151      <hr />
152      <table width="100%" summary="Navigation footer">
153        <tr>
154          <td width="40%" align="left"><a accesskey="p" href="mutexset_max.html">Prev</a>��</td>
155          <td width="20%" align="center">
156            <a accesskey="u" href="mutex.html">Up</a>
157          </td>
158          <td width="40%" align="right">��<a accesskey="n" href="mutexstat.html">Next</a></td>
159        </tr>
160        <tr>
161          <td width="40%" align="left" valign="top">DB_ENV-&gt;mutex_set_max()��</td>
162          <td width="20%" align="center">
163            <a accesskey="h" href="index.html">Home</a>
164          </td>
165          <td width="40%" align="right" valign="top">��DB_ENV-&gt;mutex_stat()</td>
166        </tr>
167      </table>
168    </div>
169  </body>
170</html>
171