source: rtems/doc/posix_users/cond.t @ 0660b4f8

4.104.114.84.95
Last change on this file since 0660b4f8 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
RevLine 
[ae68ff0]1@c
[0660b4f8]2@c COPYRIGHT (c) 1988-1999.
[7479042]3@c On-Line Applications Research Corporation (OAR).
4@c All rights reserved.
[ae68ff0]5@c
[7479042]6@c $Id$
[139b2e4a]7@c
[ae68ff0]8
9@chapter Condition Variable Manager
[c4dddee]10
[ae68ff0]11@section Introduction
12
13The condition variable manager ...
14
15The directives provided by the condition variable manager are:
16
17@itemize @bullet
[a518cc11]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
[ae68ff0]28@end itemize
29
30@section Background
31
[c4dddee]32There is currently no text in this section.
33
[ae68ff0]34@section Operations
35
[c4dddee]36There is currently no text in this section.
37
[ae68ff0]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
[7479042]45@c
46@c
47@c
[ae68ff0]48@page
[a518cc11]49@subsection pthread_condattr_init - Initialize a Condition Variable Attribute Set
[ae68ff0]50
[7479042]51@findex pthread_condattr_init
52@cindex  initialize a condition variable attribute set
53
[ae68ff0]54@subheading CALLING SEQUENCE:
55
56@example
57#include <pthread.h>
58
59int pthread_condattr_init(
[7479042]60pthread_condattr_t *attr
[ae68ff0]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
[7479042]76@c
77@c
78@c
[ae68ff0]79@page
[a518cc11]80@subsection pthread_condattr_destroy - Destroy a Condition Variable Attribute Set
[ae68ff0]81
[7479042]82@findex pthread_condattr_destroy
83@cindex  destroy a condition variable attribute set
84
[ae68ff0]85@subheading CALLING SEQUENCE:
86
87@example
88#include <pthread.h>
89
90int pthread_condattr_destroy(
[7479042]91pthread_condattr_t *attr
[ae68ff0]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
[7479042]106@c
107@c
108@c
[ae68ff0]109@page
[a518cc11]110@subsection pthread_condattr_setpshared - Set Process Shared Attribute
[ae68ff0]111
[7479042]112@findex pthread_condattr_setpshared
113@cindex  set process shared attribute
114
[ae68ff0]115@subheading CALLING SEQUENCE:
116
117@example
118#include <pthread.h>
119
120int pthread_condattr_setpshared(
[7479042]121pthread_condattr_t *attr,
122int pshared
[ae68ff0]123);
124@end example
125
126@subheading STATUS CODES:
[7479042]127
[ae68ff0]128@table @b
129@item EINVAL
130Invalid argument passed.
[7479042]131
[ae68ff0]132@end table
133
134@subheading DESCRIPTION:
135
136@subheading NOTES:
137
[7479042]138@c
139@c
140@c
[ae68ff0]141@page
[a518cc11]142@subsection pthread_condattr_getpshared - Get Process Shared Attribute
[ae68ff0]143
[7479042]144@findex pthread_condattr_getpshared
145@cindex  get process shared attribute
146
[ae68ff0]147@subheading CALLING SEQUENCE:
148
149@example
150#include <pthread.h>
151
152int pthread_condattr_getpshared(
[7479042]153const pthread_condattr_t *attr,
154int *pshared
[ae68ff0]155);
156@end example
157
158@subheading STATUS CODES:
[7479042]159
[ae68ff0]160@table @b
161@item EINVAL
162Invalid argument passed.
[7479042]163
[ae68ff0]164@end table
165
166@subheading DESCRIPTION:
167
168@subheading NOTES:
169
170
[7479042]171@c
172@c
173@c
[ae68ff0]174@page
[a518cc11]175@subsection pthread_cond_init - Initialize a Condition Variable
[ae68ff0]176
[7479042]177@findex pthread_cond_init
178@cindex  initialize a condition variable
179
[ae68ff0]180@subheading CALLING SEQUENCE:
181
182@example
183#include <pthread.h>
184
185int pthread_cond_init(
[7479042]186pthread_cond_t *cond,
187const pthread_condattr_t *attr
[ae68ff0]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
[7479042]195initialize the condition variable object.
[ae68ff0]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
[7479042]212@c
213@c
214@c
[ae68ff0]215@page
[a518cc11]216@subsection pthread_cond_destroy - Destroy a Condition Variable
[ae68ff0]217
[7479042]218@findex pthread_cond_destroy
219@cindex  destroy a condition variable
220
[ae68ff0]221@subheading CALLING SEQUENCE:
222
223@example
224#include <pthread.h>
225
226int pthread_cond_destroy(
[7479042]227pthread_cond_t *cond
[ae68ff0]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
[7479042]245@c
246@c
247@c
[ae68ff0]248@page
[a518cc11]249@subsection pthread_cond_signal - Signal a Condition Variable
[ae68ff0]250
[7479042]251@findex pthread_cond_signal
252@cindex  signal a condition variable
253
[ae68ff0]254@subheading CALLING SEQUENCE:
255
256@example
257#include <pthread.h>
258
259int pthread_cond_signal(
[7479042]260pthread_cond_t *cond
[ae68ff0]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
[7479042]275This routine should not be invoked from a handler from an asynchronous signal
[ae68ff0]276handler or an interrupt service routine.
277
[7479042]278@c
279@c
280@c
[ae68ff0]281@page
[a518cc11]282@subsection pthread_cond_broadcast - Broadcast a Condition Variable
[ae68ff0]283
[7479042]284@findex pthread_cond_broadcast
285@cindex  broadcast a condition variable
286
[ae68ff0]287@subheading CALLING SEQUENCE:
288
289@example
290#include <pthread.h>
291
292int pthread_cond_broadcast(
[7479042]293pthread_cond_t *cond
[ae68ff0]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
[7479042]308This routine should not be invoked from a handler from an asynchronous signal
[ae68ff0]309handler or an interrupt service routine.
310
[7479042]311@c
312@c
313@c
[ae68ff0]314@page
[a518cc11]315@subsection pthread_cond_wait - Wait on a Condition Variable
[ae68ff0]316
[7479042]317@findex pthread_cond_wait
318@cindex  wait on a condition variable
319
[ae68ff0]320@subheading CALLING SEQUENCE:
321
322@example
323#include <pthread.h>
324
325int pthread_cond_wait(
[7479042]326pthread_cond_t *cond,
327pthread_mutex_t *mutex
[ae68ff0]328);
329@end example
330
331@subheading STATUS CODES:
332@table @b
333@item EINVAL
[7479042]334The specified condition variable or mutex is not initialized OR different
335mutexes were specified for concurrent pthread_cond_wait() and
[ae68ff0]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
[7479042]345@c
346@c
347@c
[ae68ff0]348@page
[a518cc11]349@subsection pthread_cond_timedwait - Wait with Timeout a Condition Variable
[ae68ff0]350
[7479042]351@findex pthread_cond_timedwait
352@cindex  wait with timeout a condition variable
353
[ae68ff0]354@subheading CALLING SEQUENCE:
355
356@example
357#include <pthread.h>
358
359int pthread_cond_timedwait(
[7479042]360pthread_cond_t *cond,
361pthread_mutex_t *mutex,
362const struct timespec *abstime
[ae68ff0]363);
364@end example
365
366@subheading STATUS CODES:
367@table @b
368@item EINVAL
[7479042]369The specified condition variable or mutex is not initialized OR different
370mutexes were specified for concurrent pthread_cond_wait() and
[ae68ff0]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.
[7479042]373
[ae68ff0]374@item ETIMEDOUT
[7479042]375The specified time has elapsed without the condition variable being
[ae68ff0]376satisfied.
377
378@end table
379
380@subheading DESCRIPTION:
381
382@subheading NOTES:
383
Note: See TracBrowser for help on using the repository browser.