30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

4.9. SYSTEM MANAGEMENT FUNCTIONS 197<br />

tk ref sys<br />

Reference System Status<br />

[C Language Interface]<br />

ER ercd = tk_ref_sys ( T_RSYS *pk_rsys ) ;<br />

[Parameters]<br />

T RSYS* pk rsys Address of packet for returning status information<br />

[Return Parameters]<br />

ER ercd Error code<br />

pk rsys detail:<br />

INT sysstat System status<br />

ID runtskid ID of task currently in RUN state<br />

ID schedtskid ID of task scheduled to run next<br />

(Other implementation-dependent parameters may be added beyond this point.)<br />

[Error Codes]<br />

E OK<br />

E PAR<br />

Normal completion<br />

Parameter error (the return parameter packet address cannot be used)<br />

[Description]<br />

Gets the current system execution status, passing in return parameters such information as the dispatch<br />

disabled state and whether a task-independent portion is executing.<br />

The following values are returned in sysstat.<br />

sysstat := ( TSS_TSK | [TSS_DDSP] | [TSS_DINT] )<br />

|| ( TSS_QTSK | [TSS_DDSP] | [TSS_DINT] )<br />

|| ( TSS_INDP )<br />

TSS TSK<br />

TSS DDSP<br />

TSS DINT<br />

TSS INDP<br />

TSS QTSK<br />

Task portion executing<br />

Dispatch disabled<br />

Interrupts disabled<br />

Task-independent portion executing<br />

Quasi-task portion executing<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

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

Saved successfully!

Ooh no, something went wrong!