28.03.2015 Views

Task Management and Lab 5

Task Management and Lab 5

Task Management and Lab 5

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

void STKWrit<strong>Task</strong>()<br />

{<br />

char x[2];<br />

INT32U stk_size;<br />

OS_STK_DATA stk_data;<br />

for(;;)<br />

{<br />

OSTimeDly(8000);<br />

// period= 8000mS<br />

// LAB5: Using service to check stack space on this task+ stk_data.OSFree = total<br />

OS<strong>Task</strong>StkChk(OS_STAT_PRIO, &stk_data); stk_size = stk_data.OSUsed ;<br />

itoa(stk_size,x);<br />

DispClrScr();<br />

DispStr(0,x);<br />

}<br />

}

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

Saved successfully!

Ooh no, something went wrong!