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.

C<br />

<strong>Tornado</strong> Tools Reference<br />

EXAMPLE<br />

RETURNS<br />

SEE ALSO<br />

Windows: \ / .. .<br />

– A directory name to be appended to the current default directory.<br />

On a UNIX host, the following changes the directory to ~leslie/target/config:<br />

-> cd "~leslie/target/config"<br />

On a Windows host, the following lines are equivalent and change the directory to<br />

c:\leslie\target\config:<br />

-> cd "c:\\leslie\\target\\config"<br />

-> cd "c:/leslie/target/config"<br />

Notice that the rules for C strings require that backslashes be doubled.<br />

OK or ERROR.<br />

windsh, pwd( ), <strong>Tornado</strong> User’s Guide: Shell<br />

C<br />

checkStack( )<br />

NAME<br />

checkStack( ) – print a summary of each task’s stack usage<br />

SYNOPSIS<br />

DESCRIPTION<br />

void checkStack<br />

(<br />

int taskNameOrId /* task name or task ID; 0 = summarize all */<br />

)<br />

This command displays a summary of stack usage for a specified task, or for all tasks if no<br />

argument is given. The summary includes the total stack size (SIZE), the current number<br />

of stack bytes used (CUR), the maximum number of stack bytes used (HIGH), and the<br />

number of bytes never used at the top of the stack (MARGIN = SIZE - HIGH). For<br />

example:<br />

-> checkStack t28<br />

NAME ENTRY TID SIZE CUR HIGH MARGIN<br />

------------ ------------ -------- ----- ----- ----- ------<br />

t28 _foo 23e1c78 9208 832 3632 5576<br />

The maximum stack usage is determined by scanning down from the top of the stack for<br />

the first byte whose value is not 0xee. In VxWorks, when a task is spawned, all bytes of a<br />

task’s stack are initialized to 0xee.<br />

383

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

Saved successfully!

Ooh no, something went wrong!