source: rtems/doc/new_chapters/cond.t @ 4ebb4862

4.104.114.84.95
Last change on this file since 4ebb4862 was 4ebb4862, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/98 at 15:49:38

Removed all node and menu information since this information is now
automatically generated.

Removed any attempts to link across chapter boundaries since the manual
is incomplete.

  • Property mode set to 100644
File size: 5.5 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1998.
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} -
19@item @code{pthread_condattr_destroy} -
20@item @code{pthread_condattr_setpshared} -
21@item @code{pthread_condattr_getpshared} -
22@item @code{pthread_cond_init} -
23@item @code{pthread_cond_destroy} -
24@item @code{pthread_cond_signal} -
25@item @code{pthread_cond_broadcast} -
26@item @code{pthread_cond_wait} -
27@item @code{pthread_cond_timedwait} -
28@end itemize
29
30@section Background
31
32@section Operations
33
34@section Directives
35
36This section details the condition variable manager's directives.
37A subsection is dedicated to each of this manager's directives
38and describes the calling sequence, related constants, usage,
39and status codes.
40
41@page
42@subsection pthread_condattr_init
43
44@subheading CALLING SEQUENCE:
45
46@example
47#include <pthread.h>
48
49int pthread_condattr_init(
50  pthread_condattr_t *attr
51);
52@end example
53
54@subheading STATUS CODES:
55@table @b
56@item ENOMEM
57Insufficient memory is available to initialize the condition variable
58attributes object.
59
60@end table
61
62@subheading DESCRIPTION:
63
64@subheading NOTES:
65
66@page
67@subsection pthread_condattr_destroy
68
69@subheading CALLING SEQUENCE:
70
71@example
72#include <pthread.h>
73
74int pthread_condattr_destroy(
75  pthread_condattr_t *attr
76);
77@end example
78
79@subheading STATUS CODES:
80@table @b
81@item EINVAL
82The attribute object specified is invalid.
83
84@end table
85
86@subheading DESCRIPTION:
87
88@subheading NOTES:
89
90@page
91@subsection pthread_condattr_setpshared
92
93@subheading CALLING SEQUENCE:
94
95@example
96#include <pthread.h>
97
98int pthread_condattr_setpshared(
99  pthread_condattr_t   *attr,
100  int                   pshared
101);
102@end example
103
104@subheading STATUS CODES:
105 
106@table @b
107@item EINVAL
108Invalid argument passed.
109 
110@end table
111
112@subheading DESCRIPTION:
113
114@subheading NOTES:
115
116@page
117@subsection pthread_condattr_getpshared
118
119@subheading CALLING SEQUENCE:
120
121@example
122#include <pthread.h>
123
124int pthread_condattr_getpshared(
125  const pthread_condattr_t   *attr,
126  int                        *pshared
127);
128@end example
129
130@subheading STATUS CODES:
131 
132@table @b
133@item EINVAL
134Invalid argument passed.
135 
136@end table
137
138@subheading DESCRIPTION:
139
140@subheading NOTES:
141
142
143@page
144@subsection pthread_cond_init
145
146@subheading CALLING SEQUENCE:
147
148@example
149#include <pthread.h>
150
151int pthread_cond_init(
152  pthread_cond_t           *cond,
153  const pthread_condattr_t *attr
154);
155@end example
156
157@subheading STATUS CODES:
158@table @b
159@item EAGAIN
160The system lacked a resource other than memory necessary to create the
161initialize the condition variable object.
162
163@item ENOMEM
164Insufficient memory is available to initialize the condition variable object.
165
166@item EBUSY
167The specified condition variable has already been initialized.
168
169@item EINVAL
170The specified attribute value is invalid.
171
172@end table
173
174@subheading DESCRIPTION:
175
176@subheading NOTES:
177
178@page
179@subsection pthread_cond_destroy
180
181@subheading CALLING SEQUENCE:
182
183@example
184#include <pthread.h>
185
186int pthread_cond_destroy(
187  pthread_cond_t           *cond
188);
189@end example
190
191@subheading STATUS CODES:
192@table @b
193@item EINVAL
194The specified condition variable is invalid.
195
196@item EBUSY
197The specified condition variable is currently in use.
198
199@end table
200
201@subheading DESCRIPTION:
202
203@subheading NOTES:
204
205@page
206@subsection pthread_cond_signal
207
208@subheading CALLING SEQUENCE:
209
210@example
211#include <pthread.h>
212
213int pthread_cond_signal(
214  pthread_cond_t           *cond
215);
216@end example
217
218@subheading STATUS CODES:
219@table @b
220@item EINVAL
221The specified condition variable is not valid.
222
223@end table
224
225@subheading DESCRIPTION:
226
227@subheading NOTES:
228
229This routine should not be invoked from a handler from an asynchronous signal
230handler or an interrupt service routine.
231
232@page
233@subsection pthread_cond_broadcast
234
235@subheading CALLING SEQUENCE:
236
237@example
238#include <pthread.h>
239
240int pthread_cond_broadcast(
241  pthread_cond_t  *cond
242);
243@end example
244
245@subheading STATUS CODES:
246@table @b
247@item EINVAL
248The specified condition variable is not valid.
249
250@end table
251
252@subheading DESCRIPTION:
253
254@subheading NOTES:
255
256This routine should not be invoked from a handler from an asynchronous signal
257handler or an interrupt service routine.
258
259@page
260@subsection pthread_cond_wait
261
262@subheading CALLING SEQUENCE:
263
264@example
265#include <pthread.h>
266
267int pthread_cond_wait(
268  pthread_cond_t           *cond,
269  pthread_mutex_t          *mutex
270);
271@end example
272
273@subheading STATUS CODES:
274@table @b
275@item EINVAL
276The specified condition variable or mutex is not initialized OR different
277mutexes were specified for concurrent pthread_cond_wait() and
278pthread_cond_timedwait() operations on the same condition variable OR
279the mutex was not owned by the current thread at the time of the call.
280
281@end table
282
283@subheading DESCRIPTION:
284
285@subheading NOTES:
286
287@page
288@subsection pthread_cond_timedwait
289
290@subheading CALLING SEQUENCE:
291
292@example
293#include <pthread.h>
294
295int pthread_cond_timedwait(
296  pthread_cond_t        *cond,
297  pthread_mutex_t       *mutex,
298  const struct timespec *abstime
299);
300@end example
301
302@subheading STATUS CODES:
303@table @b
304@item EINVAL
305The specified condition variable or mutex is not initialized OR different
306mutexes were specified for concurrent pthread_cond_wait() and
307pthread_cond_timedwait() operations on the same condition variable OR
308the mutex was not owned by the current thread at the time of the call.
309 
310@item ETIMEDOUT
311The specified time has elapsed without the condition variable being
312satisfied.
313
314@end table
315
316@subheading DESCRIPTION:
317
318@subheading NOTES:
319
Note: See TracBrowser for help on using the repository browser.