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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

198 CHAPTER 4. T-KERNEL/OS FUNCTIONS<br />

#define TSS_TSK 0 /* Task portion executing */<br />

#define TSS_DDSP 1 /* Dispatch disabled */<br />

#define TSS_DINT 2 /* Interrupts disabled */<br />

#define TSS_INDP 4 /* Task-independent portion executing */<br />

#define TSS_QTSK 8 /* Quasi-task portion executing */<br />

The ID of the task currently in RUN state is returned in runtskid, while schedtskid indicates the<br />

ID of the next task scheduled to go to RUN state. Normally runtskid = schedtskid, but this is not<br />

necessarily true if, for example, a higher-priority task was wakened during dispatch disabled state. If<br />

there is no such task, 0 is returned.<br />

It must be possible to invoke this system call from an interrupt handler or time event handler.<br />

[Additional Notes]<br />

Depending on the OS implementation, the information returned by tk ref sys is not necessarily guaranteed<br />

to be accurate at all times.<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!