Debian Codegraph @

docs/api_reference/CXX/envset_thread_id_string.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>DbEnv::set_thread_id_string()</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="env.html" title="Chapter 5.  The DbEnv Handle" />
11 <link rel="prev" href="envset_thread_id.html" title="DbEnv::set_thread_id()" />
12 <link rel="next" href="envset_timeout.html" title="DbEnv::set_timeout()" />
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">DbEnv::set_thread_id_string()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_thread_id.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DbEnv Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_timeout.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_thread_id_string"></a>DbEnv::set_thread_id_string()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx&gt;
42
43 int
44 DbEnv::set_thread_id(void (*thread_id)
45 (DbEnv *dbenv, pid_t *pid, db_threadid_t *tid)); </pre>
46 <p>
47 Declare a function that formats a process ID and thread ID identifier
48 pair for display into a caller-supplied buffer. The function must
49 return a reference to the caller-specified buffer. The
50 <code class="methodname">DbEnv::set_thread_id_string()</code> method supports the
51 <a class="xref" href="envset_thread_id.html" title="DbEnv::set_thread_id()">DbEnv::set_thread_id()</a>
52 method.
53 </p>
54 <p>
55 The <code class="methodname">DbEnv::set_thread_id_string()</code> method configures operations
56 performed using the specified <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
57 handle, not all operations performed on the underlying database environment.
58 </p>
59 <p>
60 The <code class="methodname">DbEnv::set_thread_id_string()</code> method may be called at any time
61 during the life of the application.
62 </p>
63 <p>
64 The <code class="methodname">DbEnv::set_thread_id_string()</code> <span>
65
66 <span>
67 method either returns a non-zero error value or throws an
68 exception that encapsulates a non-zero error value on
69 failure, and returns 0 on success.
70 </span>
71 </span>
72 </p>
73 <div class="sect2" lang="en" xml:lang="en">
74 <div class="titlepage">
75 <div>
76 <div>
77 <h3 class="title"><a id="idp7639368"></a>Parameters</h3>
78 </div>
79 </div>
80 </div>
81 <div class="sect3" lang="en" xml:lang="en">
82 <div class="titlepage">
83 <div>
84 <div>
85 <h4 class="title"><a id="idp7630096"></a>thread_id_string</h4>
86 </div>
87 </div>
88 </div>
89 <p>
90 The <span class="bold"><strong>thread_id_string</strong></span> parameter is a
91 function which returns a buffer in which is an identifier pair
92 formatted for display. The function takes four arguments:
93 </p>
94 <div class="itemizedlist">
95 <ul type="disc">
96 <li>
97 <p>
98 <code class="literal">dbenv</code>
99 </p>
100 <p>
101 The <span class="bold"><strong>dbenv</strong></span> parameter is the enclosing database
102 environment handle, allowing application access to the application-private
103 fields of that object.
104 </p>
105 </li>
106 <li>
107 <p>
108 <code class="literal">pid</code>
109 </p>
110 <p>
111 The <span class="bold"><strong>pid</strong></span> argument is a process ID.
112 </p>
113 </li>
114 <li>
115 <p>
116 <code class="literal">tid</code>
117 </p>
118 <p>
119 The <span class="bold"><strong>tid</strong></span> argument is a thread ID.
120 </p>
121 </li>
122 <li>
123 <p>
124 <code class="literal">buf</code>
125 </p>
126 <p>
127 The <span class="bold"><strong>buf</strong></span> argument is character array of at least
128 DB_THREADID_STRLEN bytes in length, into which the identifier pair should be
129 formatted.
130 </p>
131 </li>
132 </ul>
133 </div>
134 <p>
135 If no <span class="bold"><strong>thread_id_string</strong></span> function is specified, the default
136 routine displays the identifier pair as "pid/tid", that is, the process ID represented as
137 an unsigned integer value, a slash ('/') character, then the thread ID represented as an
138 unsigned integer value.
139 </p>
140 </div>
141 </div>
142 <div class="sect2" lang="en" xml:lang="en">
143 <div class="titlepage">
144 <div>
145 <div>
146 <h3 class="title"><a id="idp7654544"></a>Errors</h3>
147 </div>
148 </div>
149 </div>
150 <p>
151 The <code class="methodname">DbEnv::set_thread_id_string()</code> <span>
152
153 <span>
154 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
155 exception, encapsulating one of the following non-zero errors, or return one
156 of the following non-zero errors:
157 </span>
158 </span>
159 </p>
160 <div class="sect3" lang="en" xml:lang="en">
161 <div class="titlepage">
162 <div>
163 <div>
164 <h4 class="title"><a id="idp7656160"></a>EINVAL</h4>
165 </div>
166 </div>
167 </div>
168 <p>
169 An invalid flag value or parameter was specified.
170 </p>
171 </div>
172 </div>
173 <div class="sect2" lang="en" xml:lang="en">
174 <div class="titlepage">
175 <div>
176 <div>
177 <h3 class="title"><a id="idp7664592"></a>Class</h3>
178 </div>
179 </div>
180 </div>
181 <p>
182 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
183 </p>
184 </div>
185 <div class="sect2" lang="en" xml:lang="en">
186 <div class="titlepage">
187 <div>
188 <div>
189 <h3 class="title"><a id="idp7660736"></a>See Also</h3>
190 </div>
191 </div>
192 </div>
193 <p>
194 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
195 </p>
196 </div>
197 </div>
198 <div class="navfooter">
199 <hr />
200 <table width="100%" summary="Navigation footer">
201 <tr>
202 <td width="40%" align="left"><a accesskey="p" href="envset_thread_id.html">Prev</a> </td>
203 <td width="20%" align="center">
204 <a accesskey="u" href="env.html">Up</a>
205 </td>
206 <td width="40%" align="right"> <a accesskey="n" href="envset_timeout.html">Next</a></td>
207 </tr>
208 <tr>
209 <td width="40%" align="left" valign="top">DbEnv::set_thread_id() </td>
210 <td width="20%" align="center">
211 <a accesskey="h" href="index.html">Home</a>
212 </td>
213 <td width="40%" align="right" valign="top"> DbEnv::set_timeout()</td>
214 </tr>
215 </table>
216 </div>
217 </body>
218 </html>