Debian Codegraph @

docs/api_reference/C/envset_lk_priority.html

raw symbols SCIP
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_lk_priority()</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="lock.html" title="Chapter 6.  The DB_LOCK Handle" />
11 <link rel="prev" href="envset_lk_partitions.html" title="DB_ENV-&gt;set_lk_partitions()" />
12 <link rel="next" href="envset_lk_tablesize.html" title="DB_ENV-&gt;set_lk_tablesize()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB_ENV-&gt;set_lk_priority()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_lk_partitions.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 6. 
26 The DB_LOCK Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_lk_tablesize.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="envset_lk_priority"></a>DB_ENV-&gt;set_lk_priority()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;set_lk_priority(DB_ENV *dbenv,
45 u_int32_t lockerid, u_int32_t priority); </pre>
46 <p>
47 Set the priority of the given locker. This value is used when
48 resolving deadlocks, the deadlock resolution algorithm will reject
49 a lock request from a locker with a lower priority before a request
50 from a locker with a higher priority.
51 </p>
52 <p>
53 By default, all lockers are created with a priority of 100.
54 </p>
55 <p>
56 The <code class="methodname">DB_ENV-&gt;set_lk_priority()</code> method may be
57 called at any time during the life of the application.
58 </p>
59 <p>
60 The <code class="methodname">DB_ENV-&gt;set_lk_priority()</code> <span>
61 <span>
62 method returns a non-zero error value on failure and 0 on success.
63 </span>
64
65 </span>
66 </p>
67 <div class="sect2" lang="en" xml:lang="en">
68 <div class="titlepage">
69 <div>
70 <div>
71 <h3 class="title"><a id="idp52561496"></a>Parameters</h3>
72 </div>
73 </div>
74 </div>
75 <div class="sect3" lang="en" xml:lang="en">
76 <div class="titlepage">
77 <div>
78 <div>
79 <h4 class="title"><a id="idp52573400"></a>lockerid</h4>
80 </div>
81 </div>
82 </div>
83 <p>
84 The <span class="bold"><strong>lockerid</strong></span> parameter
85 represents a locker returned by
86 <code class="methodname">DB_ENV-&gt;lock_id()</code>.
87 </p>
88 </div>
89 <div class="sect3" lang="en" xml:lang="en">
90 <div class="titlepage">
91 <div>
92 <div>
93 <h4 class="title"><a id="idp52569008"></a>priority</h4>
94 </div>
95 </div>
96 </div>
97 <p>
98 The <span class="bold"><strong>priority</strong></span> parameter
99 must be a value between 0 and 2^32-1.
100 </p>
101 </div>
102 </div>
103 <div class="sect2" lang="en" xml:lang="en">
104 <div class="titlepage">
105 <div>
106 <div>
107 <h3 class="title"><a id="idp52557296"></a>Errors</h3>
108 </div>
109 </div>
110 </div>
111 <p>
112 The <code class="methodname">DB_ENV-&gt;set_lk_priority()</code> <span>
113 <span>
114 method may fail and return one of the following non-zero errors:
115 </span>
116
117 </span>
118 </p>
119 <div class="sect3" lang="en" xml:lang="en">
120 <div class="titlepage">
121 <div>
122 <div>
123 <h4 class="title"><a id="idp52573464"></a>EINVAL</h4>
124 </div>
125 </div>
126 </div>
127 <p>
128 An invalid flag value or parameter was specified.
129 </p>
130 </div>
131 </div>
132 <div class="sect2" lang="en" xml:lang="en">
133 <div class="titlepage">
134 <div>
135 <div>
136 <h3 class="title"><a id="idp52579064"></a>Class</h3>
137 </div>
138 </div>
139 </div>
140 <p>
141 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>,
142 <a class="link" href="lock.html" title="Chapter 6.  The DB_LOCK Handle">DB_LOCK</a>
143 </p>
144 </div>
145 <div class="sect2" lang="en" xml:lang="en">
146 <div class="titlepage">
147 <div>
148 <div>
149 <h3 class="title"><a id="idp52580280"></a>See Also</h3>
150 </div>
151 </div>
152 </div>
153 <p>
154 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>
155 </p>
156 </div>
157 </div>
158 <div class="navfooter">
159 <hr />
160 <table width="100%" summary="Navigation footer">
161 <tr>
162 <td width="40%" align="left"><a accesskey="p" href="envset_lk_partitions.html">Prev</a> </td>
163 <td width="20%" align="center">
164 <a accesskey="u" href="lock.html">Up</a>
165 </td>
166 <td width="40%" align="right"> <a accesskey="n" href="envset_lk_tablesize.html">Next</a></td>
167 </tr>
168 <tr>
169 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_lk_partitions() </td>
170 <td width="20%" align="center">
171 <a accesskey="h" href="index.html">Home</a>
172 </td>
173 <td width="40%" align="right" valign="top"> DB_ENV-&gt;set_lk_tablesize()</td>
174 </tr>
175 </table>
176 </div>
177 </body>
178 </html>