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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
<!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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PipeWire: pw_thread_loop Class Reference</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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">PipeWire
 <span id="projectnumber">0.2.9</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<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('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpw__thread__loop.html','');});
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">pw_thread_loop Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>PipeWire threaded loop object.
<a href="classpw__thread__loop.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a44be566c483a400be731a840da066cc6"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a44be566c483a400be731a840da066cc6">pw_thread_loop_new</a> (struct <a class="el" href="structpw__loop.html">pw_loop</a> *loop, const char *name)</td></tr>
<tr class="memdesc:a44be566c483a400be731a840da066cc6"><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a>. <a href="#a44be566c483a400be731a840da066cc6">More...</a><br /></td></tr>
<tr class="separator:a44be566c483a400be731a840da066cc6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9a17c01d9f1eb487fc722ba6e5978fb6"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a9a17c01d9f1eb487fc722ba6e5978fb6">pw_thread_loop_destroy</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a9a17c01d9f1eb487fc722ba6e5978fb6"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a threaded loop. <a href="#a9a17c01d9f1eb487fc722ba6e5978fb6">More...</a><br /></td></tr>
<tr class="separator:a9a17c01d9f1eb487fc722ba6e5978fb6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e9d6936347e67f291c60e3d4535c609"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a1e9d6936347e67f291c60e3d4535c609">pw_thread_loop_start</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a1e9d6936347e67f291c60e3d4535c609"><td class="mdescLeft"> </td><td class="mdescRight">Start the thread to handle <em>loop</em>. <a href="#a1e9d6936347e67f291c60e3d4535c609">More...</a><br /></td></tr>
<tr class="separator:a1e9d6936347e67f291c60e3d4535c609"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b6246af731f756a565ce4422f4d594c"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a6b6246af731f756a565ce4422f4d594c">pw_thread_loop_stop</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a6b6246af731f756a565ce4422f4d594c"><td class="mdescLeft"> </td><td class="mdescRight">Quit the loop and stop its thread. <a href="#a6b6246af731f756a565ce4422f4d594c">More...</a><br /></td></tr>
<tr class="separator:a6b6246af731f756a565ce4422f4d594c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abc5210d06140d00bbd57fa7bfff2d2c9"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#abc5210d06140d00bbd57fa7bfff2d2c9">pw_thread_loop_lock</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:abc5210d06140d00bbd57fa7bfff2d2c9"><td class="mdescLeft"> </td><td class="mdescRight">Lock the mutex associated with <em>loop</em>. <a href="#abc5210d06140d00bbd57fa7bfff2d2c9">More...</a><br /></td></tr>
<tr class="separator:abc5210d06140d00bbd57fa7bfff2d2c9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6f8d7df649ce90ac6897fa191d2ddae5"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a6f8d7df649ce90ac6897fa191d2ddae5">pw_thread_loop_unlock</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a6f8d7df649ce90ac6897fa191d2ddae5"><td class="mdescLeft"> </td><td class="mdescRight">Unlock the mutex associated with <em>loop</em>. <a href="#a6f8d7df649ce90ac6897fa191d2ddae5">More...</a><br /></td></tr>
<tr class="separator:a6f8d7df649ce90ac6897fa191d2ddae5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acc51f6d0e50cac6c9d9d36c5ebc160c6"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop, bool wait_for_accept)</td></tr>
<tr class="memdesc:acc51f6d0e50cac6c9d9d36c5ebc160c6"><td class="mdescLeft"> </td><td class="mdescRight">Signal the thread. <a href="#acc51f6d0e50cac6c9d9d36c5ebc160c6">More...</a><br /></td></tr>
<tr class="separator:acc51f6d0e50cac6c9d9d36c5ebc160c6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a13f7ce6d73690c83c9b534b9de247fb1"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a13f7ce6d73690c83c9b534b9de247fb1">pw_thread_loop_wait</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a13f7ce6d73690c83c9b534b9de247fb1"><td class="mdescLeft"> </td><td class="mdescRight">Wait for the loop thread to call <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> <a href="#a13f7ce6d73690c83c9b534b9de247fb1">More...</a><br /></td></tr>
<tr class="separator:a13f7ce6d73690c83c9b534b9de247fb1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2d164c2509c7a027eb49c5b64343cbf9"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT int </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a2d164c2509c7a027eb49c5b64343cbf9">pw_thread_loop_timed_wait</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop, int wait_max_sec)</td></tr>
<tr class="memdesc:a2d164c2509c7a027eb49c5b64343cbf9"><td class="mdescLeft"> </td><td class="mdescRight">Wait for the loop thread to call <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> or time out. <a href="#a2d164c2509c7a027eb49c5b64343cbf9">More...</a><br /></td></tr>
<tr class="separator:a2d164c2509c7a027eb49c5b64343cbf9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acfa6ba708e19ca13a174c8e9a636dee0"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#acfa6ba708e19ca13a174c8e9a636dee0">pw_thread_loop_accept</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:acfa6ba708e19ca13a174c8e9a636dee0"><td class="mdescLeft"> </td><td class="mdescRight">Signal the loop thread waiting for accept with <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> <a href="#acfa6ba708e19ca13a174c8e9a636dee0">More...</a><br /></td></tr>
<tr class="separator:acfa6ba708e19ca13a174c8e9a636dee0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7264a7fe637e8fc43c8b14e627e04561"><td class="memItemLeft" align="right" valign="top">SPA_EXPORT bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classpw__thread__loop.html#a7264a7fe637e8fc43c8b14e627e04561">pw_thread_loop_in_thread</a> (struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> *loop)</td></tr>
<tr class="memdesc:a7264a7fe637e8fc43c8b14e627e04561"><td class="mdescLeft"> </td><td class="mdescRight">Check if we are inside the thread of the loop. <a href="#a7264a7fe637e8fc43c8b14e627e04561">More...</a><br /></td></tr>
<tr class="separator:a7264a7fe637e8fc43c8b14e627e04561"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>PipeWire threaded loop object. </p>
<p>The threaded loop object runs a <a class="el" href="structpw__loop.html">pw_loop</a> in a separate thread and ensures proper locking is done.</p>
<p>All of the loop callbacks will be executed with the loop lock held.</p>
<p>See also <a class="el" href="page_thread_loop.html">Threaded Loop</a> </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="acfa6ba708e19ca13a174c8e9a636dee0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfa6ba708e19ca13a174c8e9a636dee0">◆ </a></span>pw_thread_loop_accept()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_accept </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Signal the loop thread waiting for accept with <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> to signal </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a9a17c01d9f1eb487fc722ba6e5978fb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a17c01d9f1eb487fc722ba6e5978fb6">◆ </a></span>pw_thread_loop_destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_destroy </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a threaded loop. </p>
<p class="reference">References <a class="el" href="loop_8h.html#a5ca87923bfa2820ee6e73fbf890bac54">pw_loop_destroy_source</a>, <a class="el" href="thread-loop_8c.html#ad45129e1e319f962e8c02a8ea3581779">pw_thread_loop_events_destroy</a>, and <a class="el" href="classpw__thread__loop.html#a6b6246af731f756a565ce4422f4d594c">pw_thread_loop_stop()</a>.</p>
</div>
</div>
<a id="a7264a7fe637e8fc43c8b14e627e04561"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7264a7fe637e8fc43c8b14e627e04561">◆ </a></span>pw_thread_loop_in_thread()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT bool pw_thread_loop_in_thread </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if we are inside the thread of the loop. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> to signal </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true when called inside the thread of <em>loop</em>. </dd></dl>
</div>
</div>
<a id="abc5210d06140d00bbd57fa7bfff2d2c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc5210d06140d00bbd57fa7bfff2d2c9">◆ </a></span>pw_thread_loop_lock()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_lock </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Lock the mutex associated with <em>loop</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="classpw__log.html#a0a957072ba799bbf2bdc77501ccd81d0">pw_log::pw_log_trace</a>.</p>
</div>
</div>
<a id="a44be566c483a400be731a840da066cc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44be566c483a400be731a840da066cc6">◆ </a></span>pw_thread_loop_new()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * pw_thread_loop_new </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structpw__loop.html">pw_loop</a> * </td>
<td class="paramname"><em>loop</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>the loop to wrap </td></tr>
<tr><td class="paramname">name</td><td>the name of the thread or NULL </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a></dd></dl>
<p>Make a new <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> that will run <em>loop</em> in a thread with <em>name</em>.</p>
<p>After this function you should probably call <a class="el" href="classpw__thread__loop.html#a1e9d6936347e67f291c60e3d4535c609" title="Start the thread to handle loop.">pw_thread_loop_start()</a> to actually start the thread </p>
<p class="reference">References <a class="el" href="thread-loop_8c.html#aa2b3b06b1fcf7009b46656e8e0fd1488">CHECK</a>, <a class="el" href="classpw__log.html#a98a49c37f11de525890014e927e34d02">pw_log::pw_log_debug</a>, and <a class="el" href="loop_8h.html#ac62ac71350289ac2b1a312761b2bb82c">pw_loop_add_event</a>.</p>
</div>
</div>
<a id="acc51f6d0e50cac6c9d9d36c5ebc160c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc51f6d0e50cac6c9d9d36c5ebc160c6">◆ </a></span>pw_thread_loop_signal()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_signal </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>wait_for_accept</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Signal the thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> to signal </td></tr>
<tr><td class="paramname">wait_for_accept</td><td>if we need to wait for accept</td></tr>
</table>
</dd>
</dl>
<p>Signal the thread of <em>loop</em>. If <em>wait_for_accept</em> is true, this function waits until <a class="el" href="classpw__thread__loop.html#acfa6ba708e19ca13a174c8e9a636dee0">pw_thread_loop_accept()</a> is called. </p>
<p class="reference">References <a class="el" href="classpw__log.html#a0a957072ba799bbf2bdc77501ccd81d0">pw_log::pw_log_trace</a>.</p>
</div>
</div>
<a id="a1e9d6936347e67f291c60e3d4535c609"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e9d6936347e67f291c60e3d4535c609">◆ </a></span>pw_thread_loop_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT int pw_thread_loop_start </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start the thread to handle <em>loop</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>
</div>
</div>
<a id="a6b6246af731f756a565ce4422f4d594c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b6246af731f756a565ce4422f4d594c">◆ </a></span>pw_thread_loop_stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_stop </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Quit the loop and stop its thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="classpw__log.html#a98a49c37f11de525890014e927e34d02">pw_log::pw_log_debug</a>, and <a class="el" href="loop_8h.html#aa26ce5ccf840db64b7e1de4b3f57de6e">pw_loop_signal_event</a>.</p>
<p class="reference">Referenced by <a class="el" href="classpw__thread__loop.html#a9a17c01d9f1eb487fc722ba6e5978fb6">pw_thread_loop_destroy()</a>.</p>
</div>
</div>
<a id="a2d164c2509c7a027eb49c5b64343cbf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d164c2509c7a027eb49c5b64343cbf9">◆ </a></span>pw_thread_loop_timed_wait()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT int pw_thread_loop_timed_wait </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>wait_max_sec</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for the loop thread to call <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> or time out. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> to signal </td></tr>
<tr><td class="paramname">wait_max_sec</td><td>the maximum number of seconds to wait for a <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success or ETIMEDOUT on timeout </dd></dl>
</div>
</div>
<a id="a6f8d7df649ce90ac6897fa191d2ddae5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f8d7df649ce90ac6897fa191d2ddae5">◆ </a></span>pw_thread_loop_unlock()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_unlock </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Unlock the mutex associated with <em>loop</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="classpw__log.html#a0a957072ba799bbf2bdc77501ccd81d0">pw_log::pw_log_trace</a>.</p>
</div>
</div>
<a id="a13f7ce6d73690c83c9b534b9de247fb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13f7ce6d73690c83c9b534b9de247fb1">◆ </a></span>pw_thread_loop_wait()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SPA_EXPORT void pw_thread_loop_wait </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> * </td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for the loop thread to call <a class="el" href="classpw__thread__loop.html#acc51f6d0e50cac6c9d9d36c5ebc160c6">pw_thread_loop_signal()</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>a <a class="el" href="classpw__thread__loop.html">pw_thread_loop</a> to signal </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="classpw__log.html#a0a957072ba799bbf2bdc77501ccd81d0">pw_log::pw_log_trace</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="thread-loop_8h_source.html">thread-loop.h</a></li>
<li><a class="el" href="thread-loop_8c.html">thread-loop.c</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="classpw__thread__loop.html">pw_thread_loop</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>
|