forked from jackaudio/jackaudio.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroup__ClientThreads.html
More file actions
281 lines (258 loc) · 14.8 KB
/
group__ClientThreads.html
File metadata and controls
281 lines (258 loc) · 14.8 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>JACK-AUDIO-CONNECTION-KIT: Creating and managing client threads</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">JACK-AUDIO-CONNECTION-KIT
 <span id="projectnumber">0.124.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Creating and managing client threads</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#ga7f6e4000dad24f6742ecca4d9efa1b5a">jack_thread_creator_t</a> )(<a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> *, const pthread_attr_t *, void *(*function)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#ga4ee2fcbb266618d66a2cf354d8c54359">jack_client_real_time_priority</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#gaa266166c958e1b745ce48ef7ca89890f">jack_client_max_real_time_priority</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#gaec301b7cb1dcd39d7fc88fa9f769dab8">jack_acquire_real_time_scheduling</a> (<a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> thread, int priority) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#ga522094adfc39ec4770d8e82bd601e365">jack_client_create_thread</a> (<a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> *<a class="el" href="simple__client_8c.html#afed7053cd7bdd1cce33dec7213f340ea">client</a>, <a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> *thread, int priority, int realtime, void *(*start_routine)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#ga0d75ca78f4088f515f1befc108f3f2e7">jack_drop_real_time_scheduling</a> (<a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> thread) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ClientThreads.html#ga157ab0ade60e266ffd26ddffdb5545af">jack_set_thread_creator</a> (<a class="el" href="group__ClientThreads.html#ga7f6e4000dad24f6742ecca4d9efa1b5a">jack_thread_creator_t</a> creator) JACK_OPTIONAL_WEAK_EXPORT</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga7f6e4000dad24f6742ecca4d9efa1b5a"></a><!-- doxytag: member="thread.h::jack_thread_creator_t" ref="ga7f6e4000dad24f6742ecca4d9efa1b5a" args=")(jack_native_thread_t *, const pthread_attr_t *, void *(*function)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* <a class="el" href="group__ClientThreads.html#ga7f6e4000dad24f6742ecca4d9efa1b5a">jack_thread_creator_t</a>)(<a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> *, const pthread_attr_t *, void *(*function)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaec301b7cb1dcd39d7fc88fa9f769dab8"></a><!-- doxytag: member="thread.h::jack_acquire_real_time_scheduling" ref="gaec301b7cb1dcd39d7fc88fa9f769dab8" args="(jack_native_thread_t thread, int priority) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__ClientThreads.html#gaec301b7cb1dcd39d7fc88fa9f769dab8">jack_acquire_real_time_scheduling</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> </td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>priority</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Attempt to enable realtime scheduling for a thread. On some systems that may require special privileges.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">thread</td><td>POSIX thread ID. </td></tr>
<tr><td class="paramname">priority</td><td>requested thread priority.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0, if successful; EPERM, if the calling process lacks required realtime privileges; otherwise some other error number. </dd></dl>
</div>
</div>
<a class="anchor" id="ga522094adfc39ec4770d8e82bd601e365"></a><!-- doxytag: member="thread.h::jack_client_create_thread" ref="ga522094adfc39ec4770d8e82bd601e365" args="(jack_client_t *client, jack_native_thread_t *thread, int priority, int realtime, void *(*start_routine)(void *), void *arg) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__ClientThreads.html#ga522094adfc39ec4770d8e82bd601e365">jack_client_create_thread</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"><em>client</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> * </td>
<td class="paramname"><em>thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>priority</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>realtime</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *(*)(void *) </td>
<td class="paramname"><em>start_routine</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a thread for JACK or one of its clients. The thread is created executing <em>start_routine</em> with <em>arg</em> as its sole argument.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">client</td><td>the JACK client for whom the thread is being created. May be NULL if the client is being created within the JACK server. </td></tr>
<tr><td class="paramname">thread</td><td>place to return POSIX thread ID. </td></tr>
<tr><td class="paramname">priority</td><td>thread priority, if realtime. </td></tr>
<tr><td class="paramname">realtime</td><td>true for the thread to use realtime scheduling. On some systems that may require special privileges. </td></tr>
<tr><td class="paramname">start_routine</td><td>function the thread calls when it starts. </td></tr>
<tr><td class="paramname">arg</td><td>parameter passed to the <em>start_routine</em>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0, if successful; otherwise some error number. </dd></dl>
</div>
</div>
<a class="anchor" id="gaa266166c958e1b745ce48ef7ca89890f"></a><!-- doxytag: member="thread.h::jack_client_max_real_time_priority" ref="gaa266166c958e1b745ce48ef7ca89890f" args="(jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__ClientThreads.html#gaa266166c958e1b745ce48ef7ca89890f">jack_client_max_real_time_priority</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>if JACK is running with realtime scheduling, this returns the maximum priority that a JACK client thread should use if the thread is subject to realtime scheduling. Otherwise returns -1. </dd></dl>
</div>
</div>
<a class="anchor" id="ga4ee2fcbb266618d66a2cf354d8c54359"></a><!-- doxytag: member="thread.h::jack_client_real_time_priority" ref="ga4ee2fcbb266618d66a2cf354d8c54359" args="(jack_client_t *) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__ClientThreads.html#ga4ee2fcbb266618d66a2cf354d8c54359">jack_client_real_time_priority</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#a96cf103940d2ee71b141d4b9d0c116bf">jack_client_t</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>if JACK is running with realtime scheduling, this returns the priority that any JACK-created client threads will run at. Otherwise returns -1. </dd></dl>
</div>
</div>
<a class="anchor" id="ga0d75ca78f4088f515f1befc108f3f2e7"></a><!-- doxytag: member="thread.h::jack_drop_real_time_scheduling" ref="ga0d75ca78f4088f515f1befc108f3f2e7" args="(jack_native_thread_t thread) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__ClientThreads.html#ga0d75ca78f4088f515f1befc108f3f2e7">jack_drop_real_time_scheduling</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="types_8h.html#aa1b0573fe4fefa52a5eb4d8c266783b4">jack_native_thread_t</a> </td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Drop realtime scheduling for a thread.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">thread</td><td>POSIX thread ID.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0, if successful; otherwise an error number. </dd></dl>
</div>
</div>
<a class="anchor" id="ga157ab0ade60e266ffd26ddffdb5545af"></a><!-- doxytag: member="thread.h::jack_set_thread_creator" ref="ga157ab0ade60e266ffd26ddffdb5545af" args="(jack_thread_creator_t creator) JACK_OPTIONAL_WEAK_EXPORT" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__ClientThreads.html#ga157ab0ade60e266ffd26ddffdb5545af">jack_set_thread_creator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__ClientThreads.html#ga7f6e4000dad24f6742ecca4d9efa1b5a">jack_thread_creator_t</a> </td>
<td class="paramname"><em>creator</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This function can be used in very very specialized cases where it is necessary that client threads created by JACK are created by something other than pthread_create(). After it is used, any threads that JACK needs for the client will will be created by calling the function passed to this function.</p>
<p>No normal application/client should consider calling this. The specific case for which it was created involves running win32/x86 plugins under Wine on Linux, where it is necessary that all threads that might call win32 functions are known to Wine.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">creator</td><td>a function that creates a new thread </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri May 30 2014 23:44:11 for JACK-AUDIO-CONNECTION-KIT by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>