02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5<br />

Shell<br />

! WARNING: Most of the shell commands correspond to similar routines that can be<br />

linked into VxWorks for use with the target-resident version of the shell (VxWorks<br />

Programmer’s Guide: Target Shell). However, the target-resident routines differ in<br />

some details.For reference information on a shell command, be sure to consult the<br />

windsh entry in D. <strong>Tornado</strong> Tools Reference or use the HTML help for the command.<br />

Although there is usually an entry with the same name in the VxWorks Reference<br />

Manual, it describes a related target routine, not the shell command.<br />

5<br />

Task Management<br />

Table 5-2 summarizes the WindSh commands that manage VxWorks tasks.<br />

Table 5-2<br />

WindSh Commands for Task Management<br />

Call<br />

sp( )<br />

sps()<br />

tr( )<br />

ts()<br />

td( )<br />

period()<br />

repeat( )<br />

taskIdDefault( )<br />

Description<br />

Spawn a task with default parameters.<br />

Spawn a task, but leave it suspended.<br />

Resume a suspended task.<br />

Suspend a task.<br />

Delete a task.<br />

Spawn a task to call a function periodically.<br />

Spawn a task to call a function repeatedly.<br />

Set or report the default (current) task ID (see 5.3.5 The “Current” Task<br />

and Address, p.181 for a discussion of how the current task is established<br />

and used).<br />

The repeat( ) and period( ) commands spawn tasks whose entry points are<br />

_repeatHost and _periodHost. The shell downloads these support routines when<br />

you call repeat( ) or period( ). (With remote target servers, that download<br />

sometimes fails; for a discussion of when this is possible, and what you can do<br />

about it, see 5.6 Object Module Load Path, p.196.) These tasks may be controlled like<br />

any other tasks on the target; for example, you can suspend or delete them with<br />

ts( ) or td( ) respectively.<br />

157

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!