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.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

sp( )<br />

NAME<br />

SYNOPSIS<br />

DESCRIPTION<br />

sp( ) – spawn a task with default parameters<br />

int sp<br />

(<br />

FUNCPTR func, /* function to call */<br />

int arg1, /* first of nine args to pass to spawned task */<br />

int arg2,<br />

int arg3,<br />

int arg4,<br />

int arg5,<br />

int arg6,<br />

int arg7,<br />

int arg8,<br />

int arg9<br />

)<br />

This command spawns a specified function as a task with the following defaults:<br />

priority:<br />

100<br />

stack size:<br />

20,000 bytes<br />

task ID:<br />

highest not currently used<br />

task options:<br />

VX_FP_TASK - execute with floating-point coprocessor support.<br />

task name:<br />

A name of the form sXuN where X is the shell number and N is an integer which<br />

increments as new tasks are spawned. The shell number depends on the number of<br />

connected shells and on the order of connection. First connected shell has a 1 shell<br />

number, then 2 3 4 ... If shell 2 disconnects, and another one connects, its shell number<br />

will be 2 (first free slot number). Thus task names should look like s1u1, s1u2, s5u3,<br />

etc.<br />

The task ID is displayed after the task is spawned.<br />

This command can also be used to spawn a task when the agent is in external mode. The<br />

new task is created in the context of tExcTask, and will not start running until that task<br />

has processed the spawn request. For a task started this way, only four arguments may be<br />

given.<br />

414

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

Saved successfully!

Ooh no, something went wrong!