source: rtems/doc/new_chapters/cond.t @ 241e4c7c

4.104.114.84.95
Last change on this file since 241e4c7c was 241e4c7c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/29/98 at 00:04:53

Added sentence to indicate sections were deliberately empty.

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