source: rtems/doc/itron3.0/tasksync.t @ 110bdfe

4.104.114.84.95
Last change on this file since 110bdfe was 110bdfe, checked in by Joel Sherrill <joel.sherrill@…>, on 05/26/99 at 18:20:40

Made the gen_section more accurate.

  • Property mode set to 100644
File size: 5.6 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} - Suspend Other Task
20@item @code{rsm_tsk} - Resume Suspended Task
21@item @code{frsm_tsk} - Forcibly Resume Suspended Task
22@item @code{slp_tsk} - Sleep Task
23@item @code{tslp_tsk} - Sleep Task with Timeout
24@item @code{wup_tsk} - Wakeup Other Task
25@item @code{can_wup} - Cancel Wakeup Request
26@end itemize
27
28@section Background
29
30@section Operations
31
32@section System Calls
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 -  Suspend Other Task
46
47@subheading CALLING SEQUENCE:
48
49@ifset is-C
50@example
51ER sus_tsk (
52 ID tskid
53);
54@end example
55@end ifset
56
57@ifset is-Ada
58@end ifset
59
60@subheading STATUS CODES:
61
62@code{EXXX} -
63
64@subheading DESCRIPTION:
65
66@subheading NOTES:
67
68
69@c
70@c  rsm_tsk
71@c
72
73@page
74@subsection rsm_tsk -  Forcibly Resume Suspended Task Resume Suspended Task
75
76@subheading CALLING SEQUENCE:
77
78@ifset is-C
79@example
80ER rsm_tsk (
81 ID tskid ER ercd =frsm_tsk
82);
83@end example
84@end ifset
85
86@ifset is-Ada
87@end ifset
88
89@subheading STATUS CODES:
90
91@code{EXXX} -
92
93@subheading DESCRIPTION:
94
95@subheading NOTES:
96
97
98@c
99@c  frsm_tsk
100@c
101
102@page
103@subsection frsm_tsk -  Forcibly Resume Suspended Task
104
105@subheading CALLING SEQUENCE:
106
107@ifset is-C
108@example
109ER ercd =frsm_tsk (
110 ID tskid
111);
112@end example
113@end ifset
114
115@ifset is-Ada
116@end ifset
117
118@subheading STATUS CODES:
119
120@code{EXXX} -
121
122@subheading DESCRIPTION:
123
124@subheading NOTES:
125
126
127@c
128@c  slp_tsk
129@c
130
131@page
132@subsection slp_tsk -  Sleep Task Sleep Task with Timeout
133
134@subheading CALLING SEQUENCE:
135
136@ifset is-C
137@example
138ER slp_tsk (
139 ER ercd =tslp_tsk
140);
141@end example
142@end ifset
143
144@ifset is-Ada
145@end ifset
146
147@subheading STATUS CODES:
148
149@code{EXXX} -
150
151@subheading DESCRIPTION:
152This 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.
153
154Since 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.
155No polling function for slp_tsk is provided.  A similar function can be implemented if necessary using can_wup.
156
157@c
158@c  tslp_tsk
159@c
160
161@subsection tslp_tsk -  Sleep Task with Timeout
162@subsection tslp_tsk - Sleep Task with Timeout
163
164@subheading CALLING SEQUENCE:
165
166@ifset is-C
167ER ercd =tslp_tsk (
168 TMO tmout
169  TMO tmout
170);
171@end example
172@end ifset
173
174@ifset is-Ada
175@end ifset
176
177@subheading STATUS CODES:
178@code{EXXX} -
179@code{E_CTX} - Context error (issued from task-independent portions or a task in dispatch disabled state)
180
181The 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.
182
183Since 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.
184If you simply wish to delay a task (make it wait for a while), use dly_tsk rather than tslp_tsk.
185
186@c
187@c  wup_tsk
188@c
189
190@subsection wup_tsk -  Wakeup Other Task
191@subsection wup_tsk - Wakeup Other Task
192
193@subheading CALLING SEQUENCE:
194
195@ifset is-C
196ER wup_tsk (
197 ID tskid
198  ID tskid
199);
200@end example
201@end ifset
202
203@ifset is-Ada
204@end ifset
205
206@subheading STATUS CODES:
207@code{EXXX} -
208@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
209
210If 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.
211
212An E_QOVR error will result if wup_tsk is issued more than the maximum value allowed for the wakeup request queuing count (wupcnt).
213
214
215@c
216@c  can_wup
217@c
218
219@subsection can_wup -  Cancel Wakeup Request
220@subsection can_wup - Cancel Wakeup Request
221
222@subheading CALLING SEQUENCE:
223
224@ifset is-C
225ER can_wup (
226 INT *p_wupcnt, ID tskid
227  ID tskid
228);
229@end example
230@end ifset
231
232@ifset is-Ada
233@end ifset
234
235@subheading STATUS CODES:
236@code{EXXX} -
237@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)
238
239A 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.
240
241
242
Note: See TracBrowser for help on using the repository browser.