-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy paththread_8h_source.html
228 lines (226 loc) · 32.6 KB
/
thread_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevent: event2/thread.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevent
 <span id="projectnumber">2.2.1</span>
</div>
<div id="projectbrief">Event notification library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_db160b4728e6067cf5f9cc14ec42c79d.html">event2</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">thread.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="thread_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * modification, are permitted provided that the following conditions</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * are met:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * 3. The name of the author may not be used to endorse or promote products</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * derived from this software without specific prior written permission.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#ifndef EVENT2_THREAD_H_INCLUDED_</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#define EVENT2_THREAD_H_INCLUDED_</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#include <event2/visibility.h></span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#include <event2/event-config.h></span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="thread_8h.html#aa9fb1861f3b09a03c5986561dd00db0d"> 64</a></span> <span class="preprocessor">#define EVTHREAD_WRITE 0x04</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="thread_8h.html#a8c7a3fb4b1f521b4a262e5043f3fa14c"> 67</a></span> <span class="preprocessor">#define EVTHREAD_READ 0x08</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="thread_8h.html#a746e63692bf5bd5b4ee5d929df1592e2"> 71</a></span> <span class="preprocessor">#define EVTHREAD_TRY 0x10</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  </div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="preprocessor">#if !defined(EVENT__DISABLE_THREAD_SUPPORT) || defined(EVENT_IN_DOXYGEN_)</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="preprocessor">#define EVTHREAD_LOCK_API_VERSION 1</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="thread_8h.html#a8fbf4020f11c3b98459fd8d4d427513c"> 85</a></span> <span class="preprocessor">#define EVTHREAD_LOCKTYPE_RECURSIVE 1</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment">/* A read-write lock is one that allows multiple simultaneous readers, but</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * where any one writer excludes all other writers and readers. */</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor">#define EVTHREAD_LOCKTYPE_READWRITE 2</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html"> 95</a></span> <span class="keyword">struct </span><a class="code" href="structevthread__lock__callbacks.html">evthread_lock_callbacks</a> {</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#afe0e286cfffd238f4891bdb431c79eb9"> 98</a></span>  <span class="keywordtype">int</span> <a class="code" href="structevthread__lock__callbacks.html#afe0e286cfffd238f4891bdb431c79eb9">lock_api_version</a>;</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#afebbd92f9fc12e5852b0c008b423f948"> 106</a></span>  <span class="keywordtype">unsigned</span> <a class="code" href="structevthread__lock__callbacks.html#afebbd92f9fc12e5852b0c008b423f948">supported_locktypes</a>;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#a640c2b86b8e914b411848dc72a472591"> 109</a></span>  <span class="keywordtype">void</span> *(*alloc)(<span class="keywordtype">unsigned</span> locktype);</div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#afdab536528e27486ae7acb783ccad07a"> 112</a></span>  void (*<a class="code" href="structevthread__lock__callbacks.html#afdab536528e27486ae7acb783ccad07a">free</a>)(<span class="keywordtype">void</span> *<a class="code" href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025">lock</a>, <span class="keywordtype">unsigned</span> locktype);</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025"> 115</a></span>  int (*<a class="code" href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025">lock</a>)(<span class="keywordtype">unsigned</span> mode, <span class="keywordtype">void</span> *<a class="code" href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025">lock</a>);</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="structevthread__lock__callbacks.html#ae896047fcd1b4c5095d2b05a58e0a35d"> 118</a></span>  int (*<a class="code" href="structevthread__lock__callbacks.html#ae896047fcd1b4c5095d2b05a58e0a35d">unlock</a>)(<span class="keywordtype">unsigned</span> mode, <span class="keywordtype">void</span> *<a class="code" href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025">lock</a>);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> };</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#ae5fa5c777ca30576db8355a9140c533b">evthread_set_lock_callbacks</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structevthread__lock__callbacks.html">evthread_lock_callbacks</a> *);</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  </div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor">#define EVTHREAD_CONDITION_API_VERSION 1</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">struct </span>timeval;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  </div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html"> 140</a></span> <span class="keyword">struct </span><a class="code" href="structevthread__condition__callbacks.html">evthread_condition_callbacks</a> {</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html#a632a051711c8f7728e3464721d7c8084"> 143</a></span>  <span class="keywordtype">int</span> <a class="code" href="structevthread__condition__callbacks.html#a632a051711c8f7728e3464721d7c8084">condition_api_version</a>;</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html#a1112ef26fb2217351895c10ba347220c"> 148</a></span>  <span class="keywordtype">void</span> *(*alloc_condition)(<span class="keywordtype">unsigned</span> condtype);</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html#af20b2614116b6ac43f3e25012a792575"> 150</a></span>  void (*<a class="code" href="structevthread__condition__callbacks.html#af20b2614116b6ac43f3e25012a792575">free_condition</a>)(<span class="keywordtype">void</span> *cond);</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html#a453762d49a8fbcbe0f36b34dae478e8e"> 157</a></span>  int (*<a class="code" href="structevthread__condition__callbacks.html#a453762d49a8fbcbe0f36b34dae478e8e">signal_condition</a>)(<span class="keywordtype">void</span> *cond, <span class="keywordtype">int</span> broadcast);</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="structevthread__condition__callbacks.html#aa7963135768612f74dfa80f15b6c7260"> 168</a></span>  int (*<a class="code" href="structevthread__condition__callbacks.html#aa7963135768612f74dfa80f15b6c7260">wait_condition</a>)(<span class="keywordtype">void</span> *cond, <span class="keywordtype">void</span> *lock,</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">const</span> <span class="keyword">struct </span>timeval *timeout);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> };</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  </div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#a15c0f69030cfec09cc34bf8afd151bac">evthread_set_condition_callbacks</a>(</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structevthread__condition__callbacks.html">evthread_condition_callbacks</a> *);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  </div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="keywordtype">void</span> <a class="code" href="thread_8h.html#a79ec78eb62ee5082a33cfb0c14df9772">evthread_set_id_callback</a>(</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> (*id_fn)(<span class="keywordtype">void</span>));</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  </div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="preprocessor">#if (defined(_WIN32) && !defined(EVENT__DISABLE_THREAD_SUPPORT)) || defined(EVENT_IN_DOXYGEN_)</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#a1b0fe36dcb033da2c679d39ce8a190e2">evthread_use_windows_threads</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="thread_8h.html#a05306512f3074b45be6eba702440f1f1"> 204</a></span> <span class="preprocessor">#define EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED 1</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="preprocessor">#if defined(EVENT__HAVE_PTHREADS) || defined(EVENT_IN_DOXYGEN_)</span></div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#acc0cc708c566c14f4659331ec12f8a5b">evthread_use_pthreads</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="comment">/* Enables posix mutex priority inheritance</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="comment"> * (if pthread_mutexattr_setprotocol() is supported). */</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="preprocessor">#define EVTHREAD_PTHREAD_PRIO_INHERIT 0x01</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  </div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#a2cef140279d8452e69dc73cc15ca697c">evthread_use_pthreads_with_flags</a>(<span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  </div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="thread_8h.html#a8906b609d6c2bb4af5c7653c4f0f355d"> 232</a></span> <span class="preprocessor">#define EVTHREAD_USE_PTHREADS_IMPLEMENTED 1</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  </div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  </div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="keywordtype">void</span> <a class="code" href="thread_8h.html#a4b9ec0970d762320451fafc8f7cb2087">evthread_enable_lock_debugging</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="comment">/* Old (misspelled) version: This is deprecated; use</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> <span class="comment"> * evthread_enable_log_debugging instead. */</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span> <span class="keywordtype">void</span> evthread_enable_lock_debuging(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  </div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="preprocessor">#endif </span><span class="comment">/* EVENT__DISABLE_THREAD_SUPPORT */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="keyword">struct </span><a class="code" href="structevent__base.html">event_base</a>;</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> EVENT2_EXPORT_SYMBOL</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="keywordtype">int</span> <a class="code" href="thread_8h.html#ac0c39231d48295aff378fd9f65b2569a">evthread_make_base_notifiable</a>(<span class="keyword">struct</span> <a class="code" href="structevent__base.html">event_base</a> *base);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  </div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> }</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="preprocessor">#endif </span><span class="comment">/* EVENT2_THREAD_H_INCLUDED_ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="athread_8h_html_ae5fa5c777ca30576db8355a9140c533b"><div class="ttname"><a href="thread_8h.html#ae5fa5c777ca30576db8355a9140c533b">evthread_set_lock_callbacks</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *)</div><div class="ttdoc">Sets a group of functions that Libevent should use for locking.</div></div>
<div class="ttc" id="athread_8h_html_a4b9ec0970d762320451fafc8f7cb2087"><div class="ttname"><a href="thread_8h.html#a4b9ec0970d762320451fafc8f7cb2087">evthread_enable_lock_debugging</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evthread_enable_lock_debugging(void)</div><div class="ttdoc">Enable debugging wrappers around the current lock callbacks.</div></div>
<div class="ttc" id="astructevthread__condition__callbacks_html"><div class="ttname"><a href="structevthread__condition__callbacks.html">evthread_condition_callbacks</a></div><div class="ttdoc">This structure describes the interface a threading library uses for condition variables.</div><div class="ttdef"><b>Definition:</b> thread.h:140</div></div>
<div class="ttc" id="athread_8h_html_a79ec78eb62ee5082a33cfb0c14df9772"><div class="ttname"><a href="thread_8h.html#a79ec78eb62ee5082a33cfb0c14df9772">evthread_set_id_callback</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL void evthread_set_id_callback(unsigned long(*id_fn)(void))</div><div class="ttdoc">Sets the function for determining the thread id.</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html_afe0e286cfffd238f4891bdb431c79eb9"><div class="ttname"><a href="structevthread__lock__callbacks.html#afe0e286cfffd238f4891bdb431c79eb9">evthread_lock_callbacks::lock_api_version</a></div><div class="ttdeci">int lock_api_version</div><div class="ttdoc">The current version of the locking API.</div><div class="ttdef"><b>Definition:</b> thread.h:98</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html_a1eb04c0bb0cf9dba264d1b5ed7c9e025"><div class="ttname"><a href="structevthread__lock__callbacks.html#a1eb04c0bb0cf9dba264d1b5ed7c9e025">evthread_lock_callbacks::lock</a></div><div class="ttdeci">int(* lock)(unsigned mode, void *lock)</div><div class="ttdoc">Acquire an already-allocated lock at 'lock' with mode 'mode'.</div><div class="ttdef"><b>Definition:</b> thread.h:115</div></div>
<div class="ttc" id="astructevent__base_html"><div class="ttname"><a href="structevent__base.html">event_base</a></div><div class="ttdoc">Structure to hold information and state for a Libevent dispatch loop.</div><div class="ttdef"><b>Definition:</b> event.h:219</div></div>
<div class="ttc" id="astructevthread__condition__callbacks_html_a453762d49a8fbcbe0f36b34dae478e8e"><div class="ttname"><a href="structevthread__condition__callbacks.html#a453762d49a8fbcbe0f36b34dae478e8e">evthread_condition_callbacks::signal_condition</a></div><div class="ttdeci">int(* signal_condition)(void *cond, int broadcast)</div><div class="ttdoc">Function to signal a condition variable.</div><div class="ttdef"><b>Definition:</b> thread.h:157</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html_afebbd92f9fc12e5852b0c008b423f948"><div class="ttname"><a href="structevthread__lock__callbacks.html#afebbd92f9fc12e5852b0c008b423f948">evthread_lock_callbacks::supported_locktypes</a></div><div class="ttdeci">unsigned supported_locktypes</div><div class="ttdoc">Which kinds of locks does this version of the locking API support? A bitfield of EVTHREAD_LOCKTYPE_RE...</div><div class="ttdef"><b>Definition:</b> thread.h:106</div></div>
<div class="ttc" id="athread_8h_html_a15c0f69030cfec09cc34bf8afd151bac"><div class="ttname"><a href="thread_8h.html#a15c0f69030cfec09cc34bf8afd151bac">evthread_set_condition_callbacks</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_set_condition_callbacks(const struct evthread_condition_callbacks *)</div><div class="ttdoc">Sets a group of functions that Libevent should use for condition variables.</div></div>
<div class="ttc" id="astructevthread__condition__callbacks_html_aa7963135768612f74dfa80f15b6c7260"><div class="ttname"><a href="structevthread__condition__callbacks.html#aa7963135768612f74dfa80f15b6c7260">evthread_condition_callbacks::wait_condition</a></div><div class="ttdeci">int(* wait_condition)(void *cond, void *lock, const struct timeval *timeout)</div><div class="ttdoc">Function to wait for a condition variable.</div><div class="ttdef"><b>Definition:</b> thread.h:168</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html_ae896047fcd1b4c5095d2b05a58e0a35d"><div class="ttname"><a href="structevthread__lock__callbacks.html#ae896047fcd1b4c5095d2b05a58e0a35d">evthread_lock_callbacks::unlock</a></div><div class="ttdeci">int(* unlock)(unsigned mode, void *lock)</div><div class="ttdoc">Release a lock at 'lock' using mode 'mode'.</div><div class="ttdef"><b>Definition:</b> thread.h:118</div></div>
<div class="ttc" id="athread_8h_html_a2cef140279d8452e69dc73cc15ca697c"><div class="ttname"><a href="thread_8h.html#a2cef140279d8452e69dc73cc15ca697c">evthread_use_pthreads_with_flags</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_use_pthreads_with_flags(int flags)</div><div class="ttdoc">Sets up Libevent for use with Pthreads locking and thread ID functions.</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html"><div class="ttname"><a href="structevthread__lock__callbacks.html">evthread_lock_callbacks</a></div><div class="ttdoc">This structure describes the interface a threading library uses for locking.</div><div class="ttdef"><b>Definition:</b> thread.h:95</div></div>
<div class="ttc" id="astructevthread__condition__callbacks_html_af20b2614116b6ac43f3e25012a792575"><div class="ttname"><a href="structevthread__condition__callbacks.html#af20b2614116b6ac43f3e25012a792575">evthread_condition_callbacks::free_condition</a></div><div class="ttdeci">void(* free_condition)(void *cond)</div><div class="ttdoc">Function to free a condition variable.</div><div class="ttdef"><b>Definition:</b> thread.h:150</div></div>
<div class="ttc" id="astructevthread__condition__callbacks_html_a632a051711c8f7728e3464721d7c8084"><div class="ttname"><a href="structevthread__condition__callbacks.html#a632a051711c8f7728e3464721d7c8084">evthread_condition_callbacks::condition_api_version</a></div><div class="ttdeci">int condition_api_version</div><div class="ttdoc">The current version of the conditions API.</div><div class="ttdef"><b>Definition:</b> thread.h:143</div></div>
<div class="ttc" id="athread_8h_html_acc0cc708c566c14f4659331ec12f8a5b"><div class="ttname"><a href="thread_8h.html#acc0cc708c566c14f4659331ec12f8a5b">evthread_use_pthreads</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_use_pthreads(void)</div><div class="ttdoc">Sets up Libevent for use with Pthreads locking and thread ID functions.</div></div>
<div class="ttc" id="astructevthread__lock__callbacks_html_afdab536528e27486ae7acb783ccad07a"><div class="ttname"><a href="structevthread__lock__callbacks.html#afdab536528e27486ae7acb783ccad07a">evthread_lock_callbacks::free</a></div><div class="ttdeci">void(* free)(void *lock, unsigned locktype)</div><div class="ttdoc">Function to release all storage held in 'lock', which was created with type 'locktype'.</div><div class="ttdef"><b>Definition:</b> thread.h:112</div></div>
<div class="ttc" id="athread_8h_html_ac0c39231d48295aff378fd9f65b2569a"><div class="ttname"><a href="thread_8h.html#ac0c39231d48295aff378fd9f65b2569a">evthread_make_base_notifiable</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_make_base_notifiable(struct event_base *base)</div><div class="ttdoc">Make sure it's safe to tell an event base to wake up from another thread or a signal handler.</div></div>
<div class="ttc" id="athread_8h_html_a1b0fe36dcb033da2c679d39ce8a190e2"><div class="ttname"><a href="thread_8h.html#a1b0fe36dcb033da2c679d39ce8a190e2">evthread_use_windows_threads</a></div><div class="ttdeci">EVENT2_EXPORT_SYMBOL int evthread_use_windows_threads(void)</div><div class="ttdoc">Sets up Libevent for use with Windows builtin locking and thread ID functions.</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>