source: rtems/doc/posix_users/cond.t @ 1573ec8a

4.104.114.84.95
Last change on this file since 1573ec8a was 0660b4f8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/99 at 19:50:56

Changed copyright date to 1999.

  • Property mode set to 100644
File size: 7.0 KB
Line 
1@c
2@c COPYRIGHT (c) 1988-1999.
3@c On-Line Applications Research Corporation (OAR).
4@c All rights reserved.
5@c
6@c $Id$
7@c
8
9@chapter Condition Variable Manager
10
11@section Introduction
12
13The condition variable manager ...
14
15The directives provided by the condition variable manager are:
16
17@itemize @bullet
18@item @code{pthread_condattr_init} - Initialize a Condition Variable Attribute Set
19@item @code{pthread_condattr_destroy} - Destroy a Condition Variable Attribute Set
20@item @code{pthread_condattr_setpshared} - Set Process Shared Attribute
21@item @code{pthread_condattr_getpshared} - Get Process Shared Attribute
22@item @code{pthread_cond_init} - Initialize a Condition Variable
23@item @code{pthread_cond_destroy} - Destroy a Condition Variable
24@item @code{pthread_cond_signal} - Signal a Condition Variable
25@item @code{pthread_cond_broadcast} - Broadcast a Condition Variable
26@item @code{pthread_cond_wait} - Wait on a Condition Variable
27@item @code{pthread_cond_timedwait} - With with Timeout a Condition Variable
28@end itemize
29
30@section Background
31
32There is currently no text in this section.
33
34@section Operations
35
36There is currently no text in this section.
37
38@section Directives
39
40This section details the condition variable manager's directives.
41A subsection is dedicated to each of this manager's directives
42and describes the calling sequence, related constants, usage,
43and status codes.
44
45@c
46@c
47@c
48@page
49@subsection pthread_condattr_init - Initialize a Condition Variable Attribute Set
50
51@findex pthread_condattr_init
52@cindex  initialize a condition variable attribute set
53
54@subheading CALLING SEQUENCE:
55
56@example
57#include <pthread.h>
58
59int pthread_condattr_init(
60pthread_condattr_t *attr
61);
62@end example
63
64@subheading STATUS CODES:
65@table @b
66@item ENOMEM
67Insufficient memory is available to initialize the condition variable
68attributes object.
69
70@end table
71
72@subheading DESCRIPTION:
73
74@subheading NOTES:
75
76@c
77@c
78@c
79@page
80@subsection pthread_condattr_destroy - Destroy a Condition Variable Attribute Set
81
82@findex pthread_condattr_destroy
83@cindex  destroy a condition variable attribute set
84
85@subheading CALLING SEQUENCE:
86
87@example
88#include <pthread.h>
89
90int pthread_condattr_destroy(
91pthread_condattr_t *attr
92);
93@end example
94
95@subheading STATUS CODES:
96@table @b
97@item EINVAL
98The attribute object specified is invalid.
99
100@end table
101
102@subheading DESCRIPTION:
103
104@subheading NOTES:
105
106@c
107@c
108@c
109@page
110@subsection pthread_condattr_setpshared - Set Process Shared Attribute
111
112@findex pthread_condattr_setpshared
113@cindex  set process shared attribute
114
115@subheading CALLING SEQUENCE:
116
117@example
118#include <pthread.h>
119
120int pthread_condattr_setpshared(
121pthread_condattr_t *attr,
122int pshared
123);
124@end example
125
126@subheading STATUS CODES:
127
128@table @b
129@item EINVAL
130Invalid argument passed.
131
132@end table
133
134@subheading DESCRIPTION:
135
136@subheading NOTES:
137
138@c
139@c
140@c
141@page
142@subsection pthread_condattr_getpshared - Get Process Shared Attribute
143
144@findex pthread_condattr_getpshared
145@cindex  get process shared attribute
146
147@subheading CALLING SEQUENCE:
148
149@example
150#include <pthread.h>
151
152int pthread_condattr_getpshared(
153const pthread_condattr_t *attr,
154int *pshared
155);
156@end example
157
158@subheading STATUS CODES:
159
160@table @b
161@item EINVAL
162Invalid argument passed.
163
164@end table
165
166@subheading DESCRIPTION:
167
168@subheading NOTES:
169
170
171@c
172@c
173@c
174@page
175@subsection pthread_cond_init - Initialize a Condition Variable
176
177@findex pthread_cond_init
178@cindex  initialize a condition variable
179
180@subheading CALLING SEQUENCE:
181
182@example
183#include <pthread.h>
184
185int pthread_cond_init(
186pthread_cond_t *cond,
187const pthread_condattr_t *attr
188);
189@end example
190
191@subheading STATUS CODES:
192@table @b
193@item EAGAIN
194The system lacked a resource other than memory necessary to create the
195initialize the condition variable object.
196
197@item ENOMEM
198Insufficient memory is available to initialize the condition variable object.
199
200@item EBUSY
201The specified condition variable has already been initialized.
202
203@item EINVAL
204The specified attribute value is invalid.
205
206@end table
207
208@subheading DESCRIPTION:
209
210@subheading NOTES:
211
212@c
213@c
214@c
215@page
216@subsection pthread_cond_destroy - Destroy a Condition Variable
217
218@findex pthread_cond_destroy
219@cindex  destroy a condition variable
220
221@subheading CALLING SEQUENCE:
222
223@example
224#include <pthread.h>
225
226int pthread_cond_destroy(
227pthread_cond_t *cond
228);
229@end example
230
231@subheading STATUS CODES:
232@table @b
233@item EINVAL
234The specified condition variable is invalid.
235
236@item EBUSY
237The specified condition variable is currently in use.
238
239@end table
240
241@subheading DESCRIPTION:
242
243@subheading NOTES:
244
245@c
246@c
247@c
248@page
249@subsection pthread_cond_signal - Signal a Condition Variable
250
251@findex pthread_cond_signal
252@cindex  signal a condition variable
253
254@subheading CALLING SEQUENCE:
255
256@example
257#include <pthread.h>
258
259int pthread_cond_signal(
260pthread_cond_t *cond
261);
262@end example
263
264@subheading STATUS CODES:
265@table @b
266@item EINVAL
267The specified condition variable is not valid.
268
269@end table
270
271@subheading DESCRIPTION:
272
273@subheading NOTES:
274
275This routine should not be invoked from a handler from an asynchronous signal
276handler or an interrupt service routine.
277
278@c
279@c
280@c
281@page
282@subsection pthread_cond_broadcast - Broadcast a Condition Variable
283
284@findex pthread_cond_broadcast
285@cindex  broadcast a condition variable
286
287@subheading CALLING SEQUENCE:
288
289@example
290#include <pthread.h>
291
292int pthread_cond_broadcast(
293pthread_cond_t *cond
294);
295@end example
296
297@subheading STATUS CODES:
298@table @b
299@item EINVAL
300The specified condition variable is not valid.
301
302@end table
303
304@subheading DESCRIPTION:
305
306@subheading NOTES:
307
308This routine should not be invoked from a handler from an asynchronous signal
309handler or an interrupt service routine.
310
311@c
312@c
313@c
314@page
315@subsection pthread_cond_wait - Wait on a Condition Variable
316
317@findex pthread_cond_wait
318@cindex  wait on a condition variable
319
320@subheading CALLING SEQUENCE:
321
322@example
323#include <pthread.h>
324
325int pthread_cond_wait(
326pthread_cond_t *cond,
327pthread_mutex_t *mutex
328);
329@end example
330
331@subheading STATUS CODES:
332@table @b
333@item EINVAL
334The specified condition variable or mutex is not initialized OR different
335mutexes were specified for concurrent pthread_cond_wait() and
336pthread_cond_timedwait() operations on the same condition variable OR
337the mutex was not owned by the current thread at the time of the call.
338
339@end table
340
341@subheading DESCRIPTION:
342
343@subheading NOTES:
344
345@c
346@c
347@c
348@page
349@subsection pthread_cond_timedwait - Wait with Timeout a Condition Variable
350
351@findex pthread_cond_timedwait
352@cindex  wait with timeout a condition variable
353
354@subheading CALLING SEQUENCE:
355
356@example
357#include <pthread.h>
358
359int pthread_cond_timedwait(
360pthread_cond_t *cond,
361pthread_mutex_t *mutex,
362const struct timespec *abstime
363);
364@end example
365
366@subheading STATUS CODES:
367@table @b
368@item EINVAL
369The specified condition variable or mutex is not initialized OR different
370mutexes were specified for concurrent pthread_cond_wait() and
371pthread_cond_timedwait() operations on the same condition variable OR
372the mutex was not owned by the current thread at the time of the call.
373
374@item ETIMEDOUT
375The specified time has elapsed without the condition variable being
376satisfied.
377
378@end table
379
380@subheading DESCRIPTION:
381
382@subheading NOTES:
383
Note: See TracBrowser for help on using the repository browser.