source: rtems/doc/itron3.0/tasksync.t @ 10122b7

4.104.114.84.95
Last change on this file since 10122b7 was 10122b7, checked in by Joel Sherrill <joel.sherrill@…>, on 05/20/99 at 21:55:30

Initial revision

  • Property mode set to 100644
File size: 5.3 KB
Line 
1@c
2@c  This is the chapter from the RTEMS ITRON User's Guide that
3@c  documents the services provided by the task-dependent synchronization
4@c  manager.
5@c
6@c  $Id$
7@c
8
9@chapter Task-Dependent Synchronization Manager
10
11@section Introduction
12
13The
14task-dependent synchronization manager is ...
15
16The services provided by the task-dependent synchronization manager are:
17
18@itemize @bullet
19@item @code{sus_tsk} -
20@item @code{rsm_tsk} -
21@item @code{frsm_tsk} -
22@item @code{slp_tsk} -
23@item @code{tslp_tsk} -
24@item @code{wup_tsk} -
25@item @code{can_wup} -
26@end itemize
27
28@section Background
29
30@section Operations
31
32@section Directives
33
34This section details the task-dependent synchronization manager's services.
35A subsection is dedicated to each of this manager's services
36and describes the calling sequence, related constants, usage,
37and status codes.
38
39
40@c
41@c  sus_tsk
42@c
43
44@page
45@subsection sus_tsk -
46
47@subheading CALLING SEQUENCE:
48
49@ifset is-C
50@example
51int sus_tsk(
52);
53@end example
54@end ifset
55
56@ifset is-Ada
57@end ifset
58
59@subheading STATUS CODES:
60
61@table @b
62@item E
63The
64
65@end table
66
67@subheading DESCRIPTION:
68
69@subheading NOTES:
70
71
72@c
73@c  rsm_tsk
74@c
75
76@page
77@subsection rsm_tsk -
78
79@subheading CALLING SEQUENCE:
80
81@ifset is-C
82@example
83int rsm_tsk(
84);
85@end example
86@end ifset
87
88@ifset is-Ada
89@end ifset
90
91@subheading STATUS CODES:
92
93@table @b
94@item E
95The
96
97@end table
98
99@subheading DESCRIPTION:
100
101@subheading NOTES:
102
103
104@c
105@c  frsm_tsk
106@c
107
108@page
109@subsection frsm_tsk -
110
111@subheading CALLING SEQUENCE:
112
113@ifset is-C
114@example
115int frsm_tsk(
116);
117@end example
118@end ifset
119
120@ifset is-Ada
121@end ifset
122
123@subheading STATUS CODES:
124
125@table @b
126@item E
127The
128
129@end table
130
131@subheading DESCRIPTION:
132
133@subheading NOTES:
134
135
136@c
137@c  slp_tsk
138@c
139
140@page
141@subsection slp_tsk -
142
143@subheading CALLING SEQUENCE:
144
145@ifset is-C
146@example
147int slp_tsk(
148);
149@end example
150@end ifset
151
152@ifset is-Ada
153@end ifset
154
155@subheading STATUS CODES:
156
157@table @b
158@item E
159The
160
161@end table
162
163@subheading DESCRIPTION:
164This system call puts the issuing task (which was in RUN state) into WAIT state, causing the issuing task to sleep until wup_tsk is invoked.
165
166Since the slp_tsk system call causes the issuing task to enter WAIT state, slp_tsk calls may not be nested.  It is possible, however, for another task to execute a sus_tsk on a task which has put itself in WAIT state using slp_tsk.  If this happens, the task will enter the combined WAIT-SUSPEND state.
167No polling function for slp_tsk is provided.  A similar function can be implemented if necessary using can_wup.
168
169@c
170@c  tslp_tsk
171@c
172
173@subsection tslp_tsk -
174@subsection tslp_tsk - Sleep Task with Timeout
175
176@subheading CALLING SEQUENCE:
177
178@ifset is-C
179int tslp_tsk(
180  TMO tmout
181);
182@end example
183@end ifset
184
185@ifset is-Ada
186@end ifset
187
188@subheading STATUS CODES:
189@table @b
190@item E
191The
192@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
193@end table
194
195
196The tslp_tsk system call is the same as slp_tsk but with an additional timeout feature.  If a wup_tsk is issued before the period of time specified by tmout elapses, tslp_tsk will complete normally.  An E_TMOUT error will result if no wup_tsk is issued before the time specified by tmout expires.  Specifying tmout = TMO_FEVR = -1 can be used to set the timeout period to forever (no timeout).  In this case, tslp_tsk will function exactly the same as slp_tsk causing the issuing task to wait forever for wup_tsk to be issued.
197
198Since the tslp_tsk system call causes the issuing task to enter WAIT state, tslp_tsk calls may not be nested.  It is possible, however, for another task to execute a sus_tsk on a task which has put itself in WAIT state using tslp_tsk.  If this happens, the task will enter the combined WAIT-SUSPEND state.
199If you simply wish to delay a task (make it wait for a while), use dly_tsk rather than tslp_tsk.
200
201@c
202@c  wup_tsk
203@c
204
205@subsection wup_tsk -
206@subsection wup_tsk - Wakeup Other Task
207
208@subheading CALLING SEQUENCE:
209
210@ifset is-C
211int wup_tsk(
212  ID tskid
213);
214@end example
215@end ifset
216
217@ifset is-Ada
218@end ifset
219
220@subheading STATUS CODES:
221@table @b
222@item E
223The
224@code{EN_CTXID} - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
225@end table
226
227
228If the specified task is not in the WAIT state caused by a slp_tsk or tslp_tsk, the wakeup request based on the wup_tsk call will be queued. In other words, a record will be kept that a wup_tsk has been issued for the specified task and no WAIT state will result even if slp_tsk or tslp_tsk is executed by the task later.  This is called queuing for wakeup request.
229
230An E_QOVR error will result if wup_tsk is issued more than the maximum value allowed for the wakeup request queuing count (wupcnt).
231
232
233@c
234@c  can_wup
235@c
236
237@subsection can_wup -
238@subsection can_wup - Cancel Wakeup Request
239
240@subheading CALLING SEQUENCE:
241
242@ifset is-C
243int can_wup(
244  ID tskid
245);
246@end example
247@end ifset
248
249@ifset is-Ada
250@end ifset
251
252@subheading STATUS CODES:
253@table @b
254@item E
255The
256
257@end table
258@code{EN_RPAR} - A value outside the range supported by the issuing node and/or transmission packet format was returned as a return parameter (a value outside supported range was returned for wupcnt)
259
260A task may specify itself by specifying tskid = TSK_SELF = 0.  Note, however, that an E_ID error will result if tskid = TSK_SELF = 0 is specified when this system call is issued from a task-independent portion.
261
262
263
Note: See TracBrowser for help on using the repository browser.