]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/ref/compat-uitron-task-dependent-synch-functions.html
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / doc / html / ref / compat-uitron-task-dependent-synch-functions.html
1 <!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2 <!-- This material may be distributed only subject to the terms      -->
3 <!-- and conditions set forth in the Open Publication License, v1.0  -->
4 <!-- or later (the latest version is presently available at          -->
5 <!-- http://www.opencontent.org/openpub/).                           -->
6 <!-- Distribution of the work or derivative of the work in any       -->
7 <!-- standard (paper) book form is prohibited unless prior           -->
8 <!-- permission is obtained from the copyright holder.               -->
9 <HTML
10 ><HEAD
11 ><TITLE
12 >Task-Dependent Synchronization Functions</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
14 <META
15 NAME="GENERATOR"
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17 "><LINK
18 REL="HOME"
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
21 REL="UP"
22 TITLE="µITRON API"
23 HREF="compat-uitron-microitron-api.html"><LINK
24 REL="PREVIOUS"
25 TITLE="Task Management Functions"
26 HREF="compat-uitron-task-management-functions.html"><LINK
27 REL="NEXT"
28 TITLE="   Synchronization and Communication Functions"
29 HREF="compat-uitron-sync-and-comm-functions.html"></HEAD
30 ><BODY
31 CLASS="SECT1"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#0000FF"
35 VLINK="#840084"
36 ALINK="#0000FF"
37 ><DIV
38 CLASS="NAVHEADER"
39 ><TABLE
40 SUMMARY="Header navigation table"
41 WIDTH="100%"
42 BORDER="0"
43 CELLPADDING="0"
44 CELLSPACING="0"
45 ><TR
46 ><TH
47 COLSPAN="3"
48 ALIGN="center"
49 >eCos Reference Manual</TH
50 ></TR
51 ><TR
52 ><TD
53 WIDTH="10%"
54 ALIGN="left"
55 VALIGN="bottom"
56 ><A
57 HREF="compat-uitron-task-management-functions.html"
58 ACCESSKEY="P"
59 >Prev</A
60 ></TD
61 ><TD
62 WIDTH="80%"
63 ALIGN="center"
64 VALIGN="bottom"
65 >Chapter 32. &micro;ITRON API</TD
66 ><TD
67 WIDTH="10%"
68 ALIGN="right"
69 VALIGN="bottom"
70 ><A
71 HREF="compat-uitron-sync-and-comm-functions.html"
72 ACCESSKEY="N"
73 >Next</A
74 ></TD
75 ></TR
76 ></TABLE
77 ><HR
78 ALIGN="LEFT"
79 WIDTH="100%"></DIV
80 ><DIV
81 CLASS="SECT1"
82 ><H1
83 CLASS="SECT1"
84 ><A
85 NAME="COMPAT-UITRON-TASK-DEPENDENT-SYNCH-FUNCTIONS">Task-Dependent Synchronization Functions</H1
86 ><P
87 >These functions are fully supported in this release: </P
88 ><TABLE
89 BORDER="5"
90 BGCOLOR="#E0E0F0"
91 WIDTH="70%"
92 ><TR
93 ><TD
94 ><PRE
95 CLASS="PROGRAMLISTING"
96 >ER <TT
97 CLASS="FUNCTION"
98 >sus_tsk</TT
99 >( 
100     ID <SPAN
101 CLASS="emphasis"
102 ><I
103 CLASS="EMPHASIS"
104 >tskid</I
105 ></SPAN
106 > )</PRE
107 ></TD
108 ></TR
109 ></TABLE
110 ><TABLE
111 BORDER="5"
112 BGCOLOR="#E0E0F0"
113 WIDTH="70%"
114 ><TR
115 ><TD
116 ><PRE
117 CLASS="PROGRAMLISTING"
118 >ER <TT
119 CLASS="FUNCTION"
120 >rsm_tsk</TT
121 >( 
122     ID <SPAN
123 CLASS="emphasis"
124 ><I
125 CLASS="EMPHASIS"
126 >tskid</I
127 ></SPAN
128 > )</PRE
129 ></TD
130 ></TR
131 ></TABLE
132 ><TABLE
133 BORDER="5"
134 BGCOLOR="#E0E0F0"
135 WIDTH="70%"
136 ><TR
137 ><TD
138 ><PRE
139 CLASS="PROGRAMLISTING"
140 >ER <TT
141 CLASS="FUNCTION"
142 >frsm_tsk</TT
143 >( 
144     ID <SPAN
145 CLASS="emphasis"
146 ><I
147 CLASS="EMPHASIS"
148 >tskid</I
149 ></SPAN
150 > )</PRE
151 ></TD
152 ></TR
153 ></TABLE
154 ><TABLE
155 BORDER="5"
156 BGCOLOR="#E0E0F0"
157 WIDTH="70%"
158 ><TR
159 ><TD
160 ><PRE
161 CLASS="PROGRAMLISTING"
162 >ER <TT
163 CLASS="FUNCTION"
164 >slp_tsk</TT
165 >( void )</PRE
166 ></TD
167 ></TR
168 ></TABLE
169 ><TABLE
170 BORDER="5"
171 BGCOLOR="#E0E0F0"
172 WIDTH="70%"
173 ><TR
174 ><TD
175 ><PRE
176 CLASS="PROGRAMLISTING"
177 >ER <TT
178 CLASS="FUNCTION"
179 >tslp_tsk</TT
180 >( 
181     TMO <SPAN
182 CLASS="emphasis"
183 ><I
184 CLASS="EMPHASIS"
185 >tmout</I
186 ></SPAN
187 > )</PRE
188 ></TD
189 ></TR
190 ></TABLE
191 ><TABLE
192 BORDER="5"
193 BGCOLOR="#E0E0F0"
194 WIDTH="70%"
195 ><TR
196 ><TD
197 ><PRE
198 CLASS="PROGRAMLISTING"
199 >ER <TT
200 CLASS="FUNCTION"
201 >wup_tsk</TT
202 >( 
203     ID <SPAN
204 CLASS="emphasis"
205 ><I
206 CLASS="EMPHASIS"
207 >tskid</I
208 ></SPAN
209 > )</PRE
210 ></TD
211 ></TR
212 ></TABLE
213 ><TABLE
214 BORDER="5"
215 BGCOLOR="#E0E0F0"
216 WIDTH="70%"
217 ><TR
218 ><TD
219 ><PRE
220 CLASS="PROGRAMLISTING"
221 >ER <TT
222 CLASS="FUNCTION"
223 >can_wup</TT
224 >( 
225     INT *<SPAN
226 CLASS="emphasis"
227 ><I
228 CLASS="EMPHASIS"
229 >p_wupcnt,</I
230 ></SPAN
231 >    ID <SPAN
232 CLASS="emphasis"
233 ><I
234 CLASS="EMPHASIS"
235 >tskid</I
236 ></SPAN
237 > )</PRE
238 ></TD
239 ></TR
240 ></TABLE
241 ><DIV
242 CLASS="SECT2"
243 ><H2
244 CLASS="SECT2"
245 ><A
246 NAME="AEN13571">Error checking</H2
247 ><P
248 >The following conditions are only checked for, and only return
249 errors if 
250 <TT
251 CLASS="LITERAL"
252 >CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
253 >
254 is enabled (see the configuration option &#8220;Return Error Codes for Bad
255 Params&#8221;):</P
256 ><P
257 ></P
258 ><UL
259 ><LI
260 ><P
261 >invalid tskid; less than 1 or greater than 
262 <TT
263 CLASS="LITERAL"
264 >CYGNUM_UITRON_TASKS</TT
265 >
266 returns E_ID</P
267 ></LI
268 ><LI
269 ><P
270 ><TT
271 CLASS="FUNCTION"
272 >wup_tsk()</TT
273 >
274
275 <TT
276 CLASS="FUNCTION"
277 >sus_tsk()</TT
278 >
279
280 <TT
281 CLASS="FUNCTION"
282 >rsm_tsk()</TT
283 >
284
285 <TT
286 CLASS="FUNCTION"
287 >frsm_tsk()</TT
288 >
289  on the calling task returns E_OBJ</P
290 ></LI
291 ><LI
292 ><P
293 >dispatching is enabled in 
294 <TT
295 CLASS="FUNCTION"
296 >tslp_tsk()</TT
297 >
298  and 
299 <TT
300 CLASS="FUNCTION"
301 >slp_tsk()</TT
302 >
303 , or E_CTX</P
304 ></LI
305 ><LI
306 ><P
307 >tmout must be positive, otherwise E_PAR</P
308 ></LI
309 ><LI
310 ><P
311 >return value pointer in 
312 <TT
313 CLASS="FUNCTION"
314 >can_wup()</TT
315 >
316  is a valid pointer, or E_PAR</P
317 ></LI
318 ></UL
319 ><P
320 >The following conditions are checked for, and can
321             return error codes, regardless of the setting of
322 <TT
323 CLASS="LITERAL"
324 >CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
325 >:</P
326 ><P
327 ></P
328 ><UL
329 ><LI
330 ><P
331 >When create and delete functions 
332 <TT
333 CLASS="FUNCTION"
334 >cre_tsk()</TT
335 >
336  and 
337 <TT
338 CLASS="FUNCTION"
339 >del_tsk()</TT
340 >
341  are supported, all calls which use a valid task ID number check
342 that the task exists; if not, E_NOEXS is returned</P
343 ></LI
344 ><LI
345 ><P
346 ><TT
347 CLASS="FUNCTION"
348 >sus_tsk()</TT
349 >
350 : the task must not be dormant, else E_OBJ</P
351 ></LI
352 ><LI
353 ><P
354 ><TT
355 CLASS="FUNCTION"
356 >frsm/rsm_tsk()</TT
357 >
358 : the task must be suspended, else E_OBJ</P
359 ></LI
360 ><LI
361 ><P
362 ><TT
363 CLASS="FUNCTION"
364 >tslp/slp_tsk()</TT
365 >
366 : return codes E_TMOUT, E_RLWAI and E_DLT
367 are returned depending on the reason for terminating the sleep</P
368 ></LI
369 ><LI
370 ><P
371 ><TT
372 CLASS="FUNCTION"
373 >wup_tsk()</TT
374 >
375  and 
376 <TT
377 CLASS="FUNCTION"
378 >can_wup()</TT
379 >
380 : the task must not be dormant, or E_OBJ is returned</P
381 ></LI
382 ></UL
383 ></DIV
384 ></DIV
385 ><DIV
386 CLASS="NAVFOOTER"
387 ><HR
388 ALIGN="LEFT"
389 WIDTH="100%"><TABLE
390 SUMMARY="Footer navigation table"
391 WIDTH="100%"
392 BORDER="0"
393 CELLPADDING="0"
394 CELLSPACING="0"
395 ><TR
396 ><TD
397 WIDTH="33%"
398 ALIGN="left"
399 VALIGN="top"
400 ><A
401 HREF="compat-uitron-task-management-functions.html"
402 ACCESSKEY="P"
403 >Prev</A
404 ></TD
405 ><TD
406 WIDTH="34%"
407 ALIGN="center"
408 VALIGN="top"
409 ><A
410 HREF="ecos-ref.html"
411 ACCESSKEY="H"
412 >Home</A
413 ></TD
414 ><TD
415 WIDTH="33%"
416 ALIGN="right"
417 VALIGN="top"
418 ><A
419 HREF="compat-uitron-sync-and-comm-functions.html"
420 ACCESSKEY="N"
421 >Next</A
422 ></TD
423 ></TR
424 ><TR
425 ><TD
426 WIDTH="33%"
427 ALIGN="left"
428 VALIGN="top"
429 >Task Management Functions</TD
430 ><TD
431 WIDTH="34%"
432 ALIGN="center"
433 VALIGN="top"
434 ><A
435 HREF="compat-uitron-microitron-api.html"
436 ACCESSKEY="U"
437 >Up</A
438 ></TD
439 ><TD
440 WIDTH="33%"
441 ALIGN="right"
442 VALIGN="top"
443 >Synchronization and Communication Functions</TD
444 ></TR
445 ></TABLE
446 ></DIV
447 ></BODY
448 ></HTML
449 >